Minahito
minah****@users*****
2006年 11月 2日 (木) 18:57:12 JST
Index: xoops2jp/html/modules/legacy/kernel/Legacy_AdminControllerStrategy.class.php diff -u xoops2jp/html/modules/legacy/kernel/Legacy_AdminControllerStrategy.class.php:1.1.2.4 xoops2jp/html/modules/legacy/kernel/Legacy_AdminControllerStrategy.class.php:1.1.2.5 --- xoops2jp/html/modules/legacy/kernel/Legacy_AdminControllerStrategy.class.php:1.1.2.4 Mon Oct 23 18:35:35 2006 +++ xoops2jp/html/modules/legacy/kernel/Legacy_AdminControllerStrategy.class.php Thu Nov 2 18:57:12 2006 @@ -89,7 +89,10 @@ function &getVirtualCurrentModule() { - $module = null; + static $ret_module; + if (is_object($ret_module)) { + return $ret_module; + } if ($this->mController->mRoot->mContext->mModule != null) { $module =& $this->mController->mRoot->mContext->mXoopsModule; @@ -97,16 +100,21 @@ if ($module->get('dirname') == "legacy" && isset($_REQUEST['dirname'])) { if (in_array(xoops_getrequest('action'), $this->_mSpecialActions)) { $handler =& xoops_gethandler('module'); - $module =& $handler->getByDirname(xoops_getrequest('dirname')); + $t_xoopsModule =& $handler->getByDirname(xoops_getrequest('dirname')); + $ret_module =& Legacy_Utils::createModule($t_xoopsModule); } } elseif ($module->get('dirname') == "legacy" && xoops_getrequest('action') == 'PreferenceEdit' && isset($_REQUEST['confmod_id'])) { $handler =& xoops_gethandler('module'); - $module =& $handler->get(intval(xoops_getrequest('confmod_id'))); + $t_xoopsModule =& $handler->get(intval(xoops_getrequest('confmod_id'))); + $ret_module =& Legacy_Utils::createModule($t_xoopsModule); + } + else { + $ret_module =& Legacy_Utils::createModule($module); } } - - return $module; + + return $ret_module; } function &getMainThemeObject()