[xoops-cvslog 5958] CVS update: xoops2jp/html/core

アーカイブの一覧に戻る

NobuNobu nobun****@users*****
2006年 12月 3日 (日) 00:36:01 JST


Index: xoops2jp/html/core/XCube_Controller.class.php
diff -u xoops2jp/html/core/XCube_Controller.class.php:1.1.2.7 xoops2jp/html/core/XCube_Controller.class.php:1.1.2.8
--- xoops2jp/html/core/XCube_Controller.class.php:1.1.2.7	Mon Nov 27 15:55:01 2006
+++ xoops2jp/html/core/XCube_Controller.class.php	Sun Dec  3 00:36:01 2006
@@ -1,7 +1,7 @@
 <?php
 /**
  * @package XCube
- * @version $Id: XCube_Controller.class.php,v 1.1.2.7 2006/11/27 06:55:01 minahito Exp $
+ * @version $Id: XCube_Controller.class.php,v 1.1.2.8 2006/12/02 15:36:01 nobunobu Exp $
  */
 
 if (!defined('XOOPS_ROOT_PATH')) exit();
@@ -20,6 +20,7 @@
 require_once XOOPS_ROOT_PATH . "/core/XCube_LanguageManager.class.php";
 
 require_once XOOPS_ROOT_PATH . "/core/XCube_ActionForm.class.php";
+require_once XOOPS_ROOT_PATH . "/core/XCube_TextFilter.class.php";
 
 /**
  * Virtual or Actual front controller class.
@@ -113,6 +114,14 @@
 	 */
 	var $mExecute = null;
 	
+	/**
+	 * Make a instance of TextFilter.
+	 * void senupTextFilter(XCube_TextFilter &);
+	 * 
+	 * @var XCube_Delegate
+	 */
+	var $mSetupTextFilter = null;
+	
 	function XCube_Controller()
 	{
 		$this->_mBlockChain = array();
@@ -121,6 +130,8 @@
 		
 		$this->mSetupUser =& new XCube_Delegate();
 		$this->mExecute =& new XCube_Delegate();
+		$this->mSetupTextFilter =&  new XCube_Delegate();
+	    $this->mSetupTextFilter->add('XCube_TextFilter::getInstance',XCUBE_DELEGATE_PRIORITY_FINAL);
 	}
 	
 	/**
@@ -160,6 +171,8 @@
 
         $this->_setupLanguage();
 
+        $this->_setupTextFilter();
+
 		$this->_setupConfig();
 		
 		//
@@ -284,6 +297,21 @@
 		$this->mRoot->mLanguageManager =& new XCube_LanguageManager();
 	}
 	
+	
+	/**
+	 * Creates the instance of Text Filter class, and sets it to member
+	 * property.
+	 *
+	 * @access protected
+	 */
+	function _setupTextFilter()
+	{
+	    $textFilter = null;
+	    $this->mSetupTextFilter->call(new XCube_Ref($textFilter));
+	    $this->mRoot->setTextFilter($textFilter);
+	}
+	
+	
 	/**
 	 * This member function is overridden. Loads site configuration informations,
 	 * and sets them to the member property.
Index: xoops2jp/html/core/XCube_Root.class.php
diff -u xoops2jp/html/core/XCube_Root.class.php:1.1.2.4 xoops2jp/html/core/XCube_Root.class.php:1.1.2.5
--- xoops2jp/html/core/XCube_Root.class.php:1.1.2.4	Sat Oct 21 20:08:53 2006
+++ xoops2jp/html/core/XCube_Root.class.php	Sun Dec  3 00:36:01 2006
@@ -1,7 +1,7 @@
 <?php
 /**
  * @package XCube
- * @version $Id: XCube_Root.class.php,v 1.1.2.4 2006/10/21 11:08:53 minahito Exp $
+ * @version $Id: XCube_Root.class.php,v 1.1.2.5 2006/12/02 15:36:01 nobunobu Exp $
  */
 
 require_once XOOPS_ROOT_PATH . "/core/XCube_HttpContext.class.php";
@@ -43,6 +43,8 @@
 	
 	var $mCacheSystem = null;
 	
+	var $mTextFilter = null;
+	
 	/**
 	 * @var XCube_HttpContext
 	 */
@@ -291,6 +293,20 @@
 		return $this->mPermissionManager;
 	}
 	
+	function setTextFilter(&$textFilter)
+	{
+		$this->mTextFilter =& $textFilter;
+	}
+	
+	function &getTextFilter()
+	{
+	    if (!empty($this->mTextFilter)) return $this->mTextFilter;
+	    if (!empty($this->mController)) { //ToDo: This case is for _LEGACY_PREVENT_EXEC_COMMON_ status;
+    	    $this->mController->mSetupTextFilter->call(new XCube_Ref($this->mTextFilter));
+    	    return $this->mTextFilter;
+	    }
+	}
+	
 	/**
 	 * Sets the role manager object.
 	 */
Index: xoops2jp/html/core/XCube_TextFilter.class.php
diff -u /dev/null xoops2jp/html/core/XCube_TextFilter.class.php:1.1.2.1
--- /dev/null	Sun Dec  3 00:36:01 2006
+++ xoops2jp/html/core/XCube_TextFilter.class.php	Sun Dec  3 00:36:01 2006
@@ -0,0 +1,29 @@
+<?php
+/**
+ * @package XCube
+ * @version $Id: XCube_TextFilter.class.php,v 1.1.2.1 2006/12/02 15:36:01 nobunobu Exp $
+ */
+/**
+ *
+ * @final
+ */
+class XCube_TextFilter
+{
+    var $mDummy=null;  //Dummy member for preventing object be treated as empty.
+
+    function getInstance(&$instance) {
+       if (empty($instance)) {
+            $instance = new XCube_TextFilter();
+        }
+    }
+    
+    function ToShow($str) {
+        return htmlspecialchars($str, ENT_QUOTES);
+    }
+
+    function ToEdit($str) {
+        return htmlspecialchars($str, ENT_QUOTES);
+    }
+
+}
+?>


xoops-cvslog メーリングリストの案内
アーカイブの一覧に戻る