[xoops-cvslog 3338] CVS update: xoops2jp/html/modules/base/kernel

Back to archive index

Minahito minah****@users*****
2006年 6月 22日 (木) 14:36:58 JST


Index: xoops2jp/html/modules/base/kernel/Legacy_ModuleController.class.php
diff -u xoops2jp/html/modules/base/kernel/Legacy_ModuleController.class.php:1.1.2.5 xoops2jp/html/modules/base/kernel/Legacy_ModuleController.class.php:1.1.2.6
--- xoops2jp/html/modules/base/kernel/Legacy_ModuleController.class.php:1.1.2.5	Sun Apr  2 22:06:02 2006
+++ xoops2jp/html/modules/base/kernel/Legacy_ModuleController.class.php	Thu Jun 22 14:36:58 2006
@@ -1,5 +1,5 @@
 <?php
-// $Id: Legacy_ModuleController.class.php,v 1.1.2.5 2006/04/02 13:06:02 nobunobu Exp $
+// $Id: Legacy_ModuleController.class.php,v 1.1.2.6 2006/06/22 05:36:58 minahito Exp $
 //  ------------------------------------------------------------------------ //
 //              XOOPS Cube - PHP Content Management System                   //
 //                  Copyright (c) 2005 XOOPS Cube.org                        //
@@ -27,12 +27,29 @@
 
 if (!defined('XOOPS_ROOT_PATH')) exit();
 
-define("LEGACY_XOOPS_MODULE_MANIFESTO_FILENAME","./xoops_version.php");
+define("LEGACY_XOOPS_MODULE_MANIFESTO_FILENAME", "./xoops_version.php");
 
-class Legacy_ModuleController extends XCube_ModuleController
+class Legacy_ModuleController
 {
 	var $mModuleObject;
 
+	var $mController;
+	var $mConfig;
+	
+	function Legacy_ModuleController(&$controller)
+	{
+		$this->mController=&$controller;
+	}
+
+	function getConfig($key=null)
+	{
+		if($key!=null)
+			return isset($this->mConfig[$key]) ? $this->mConfig[$key] : null;
+		else
+			return $this->mConfig;
+	}
+	
+
 	function prepare()
 	{
 		// Is this request module process?
@@ -58,19 +75,26 @@
 	}
 
 	/**
-	 @return boolean
+	 * If this request is calling module, return true.
+	 * @return boolean
 	 */
 	function isModuleProcess()
 	{
 		return file_exists(LEGACY_XOOPS_MODULE_MANIFESTO_FILENAME);
 	}
 	
+	/**
+	 * If module requested is available, return true.
+	 * @return boolean
+	 */
 	function isActive()
 	{
 		return is_object($this->mModuleObject) && $this->mModuleObject->getVar('isactive');
 	}
 	
 	/**
+	 * If the current user can access to this module, return true.
+	 * 
 	 * @todo This method re-writes $GLOBAL['xoopsUserIsAdmin']! Wmm...
 	 * @return bool
 	 */


xoops-cvslog メーリングリストの案内
Back to archive index