[xoops-cvslog 5747] CVS update: xoops2jp/html/modules/legacy/kernel

Zurück zum Archiv-Index

Minahito minah****@users*****
2006年 11月 10日 (金) 14:55:59 JST


Index: xoops2jp/html/modules/legacy/kernel/Legacy_Controller.class.php
diff -u xoops2jp/html/modules/legacy/kernel/Legacy_Controller.class.php:1.1.2.19 xoops2jp/html/modules/legacy/kernel/Legacy_Controller.class.php:1.1.2.20
--- xoops2jp/html/modules/legacy/kernel/Legacy_Controller.class.php:1.1.2.19	Fri Nov 10 12:30:00 2006
+++ xoops2jp/html/modules/legacy/kernel/Legacy_Controller.class.php	Fri Nov 10 14:55:59 2006
@@ -85,12 +85,6 @@
 	var $mSetupDebugger = null;
 	
 	/**
-	 * @var XCube_Delegate
-	 */
-	
-	var $mIsAdmin = null;
-	
-	/**
 	 * @var XoopsLogger
 	 */
 	var $mLogger = null;
@@ -125,9 +119,6 @@
 		$this->mSetupDebugger =& new XCube_Delegate();
 		$this->mSetupDebugger->add('Legacy_DebuggerManager::createInstance');
 		
-		$this->mIsAdmin =& new XCube_Delegate();
-		$this->mIsAdmin->add(array(&$this, '_isAdmin'));
-
 		set_magic_quotes_runtime(0);	// ^^;
 	}
 	
@@ -138,45 +129,35 @@
 		//
 		// Decide status. [TEST]
 		//
-
 		$this->_processHostAbstractLayer();
 
 		$urlInfo = $this->_parseUrl();
-		$adminStateFlag = null;
-		
-		$this->mIsAdmin->call(new XCube_Ref($adminStateFlag), $urlInfo);
-
-		if ($adminStateFlag) {
-			require_once XOOPS_ROOT_PATH . "/modules/legacy/kernel/Legacy_AdminControllerStrategy.class.php";
-			$this->_mStrategy =& new Legacy_AdminControllerStrategy($this);
-		}
-		else {
-			$this->_mStrategy =& new Legacy_PublicControllerStrategy($this);
-		}
-	}
-	
-	function _isAdmin(&$flag, $urlInfo)
-	{
-		if ($flag !== null) {
-			return;
-		}
 		
+		$adminStateFlag = false;
 		if (count($urlInfo) >= 3) {
 			if (strtolower($urlInfo[0]) == "modules" && strtolower($urlInfo[2]) == "admin"){
-				$flag = true;
+				$adminStateFlag = true;
 			}
 			elseif ($urlInfo[0] == "modules" && $urlInfo[1] == "legacy" && $urlInfo[2] == "include") {
-				$flag = true;
+				$adminStateFlag = true;
 			}
 			elseif ($urlInfo[0] == "modules" && $urlInfo[1] == "system" && substr($urlInfo[2], 0, 9) == "admin.php") {
-				$flag = true;
+				$adminStateFlag = true;
 			}
 		}
 		elseif (substr($urlInfo[0], 0, 9) == "admin.php") {
-			$flag = true;
+			$adminStateFlag = true;
 		}
-	}
 
+		if ($adminStateFlag) {
+			require_once XOOPS_ROOT_PATH . "/modules/legacy/kernel/Legacy_AdminControllerStrategy.class.php";
+			$this->_mStrategy =& new Legacy_AdminControllerStrategy($this);
+		}
+		else {
+			$this->_mStrategy =& new Legacy_PublicControllerStrategy($this);
+		}
+	}
+	
 	/**
 	 * @access public
 	 */


xoops-cvslog メーリングリストの案内
Zurück zum Archiv-Index