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

Back to archive index

Minahito minah****@users*****
2006年 10月 14日 (土) 02:52:17 JST


Index: xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php
diff -u xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.79.2.14 xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.79.2.15
--- xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.79.2.14	Fri Oct 13 18:21:40 2006
+++ xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php	Sat Oct 14 02:52:17 2006
@@ -1,7 +1,7 @@
 <?php
 /**
  * @package Legacy
- * @version $Id: Legacy_Controller.class.php,v 1.1.2.79.2.14 2006/10/13 09:21:40 minahito Exp $
+ * @version $Id: Legacy_Controller.class.php,v 1.1.2.79.2.15 2006/10/13 17:52:17 minahito Exp $
  */
 
 if (!defined('XOOPS_ROOT_PATH')) exit();
@@ -1267,7 +1267,7 @@
 			return;
 		}
 		
-		$context->mModule =& $this->_createModule($module);
+		$context->mModule =& Legacy_Utils::createModule($module);
 		$context->mXoopsModule =& $context->mModule->getXoopsModule();
 		
 		if ($context->mXoopsModule->get('hasconfig') == 1 || $context->mXoopsModule->get('hascomments') == 1) {
@@ -1283,42 +1283,6 @@
 		Legacy_RoleManager::loadRolesByMid($context->mXoopsModule->get('mid'));
 	}
 
-	/**
-	 * Gets the module object.
-	 * @return Legacy_Module
-	 */	
-	/**
-	 * Creates a instance of the module with the generating convention. And,
-	 * returns it.
-	 * @param XoopsModule $module
-	 * @return Legacy_Module
-	 */
-	function &_createModule($module)
-	{
-		$instance = null;
-		$dirname = $module->get('dirname');
-		
-		//
-		// IMPORTANT CONVENTION
-		//
-		$className = ucfirst($dirname) . "_Module";
-		if (!class_exists($className)) {
-			$filePath = XOOPS_ROOT_PATH . "/modules/${dirname}/class/Module.class.php";
-			if (file_exists($filePath)) {
-				require_once $filePath;
-			}
-		}
-		
-		if (class_exists($className)) {
-			$instance =& new $className($module);
-		}
-		else {
-			$instance =& new Legacy_ModuleAdapter($module);
-		}
-		
-		return $instance;
-	}
-
 	function setupBlock()
 	{
 	}


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