Minahito
minah****@users*****
2006年 1月 27日 (金) 18:28:34 JST
Index: xoops2jp/html/modules/base/class/Legacy_AdminRenderSystem.class.php diff -u xoops2jp/html/modules/base/class/Legacy_AdminRenderSystem.class.php:1.1.2.14 xoops2jp/html/modules/base/class/Legacy_AdminRenderSystem.class.php:1.1.2.15 --- xoops2jp/html/modules/base/class/Legacy_AdminRenderSystem.class.php:1.1.2.14 Wed Jan 25 12:44:03 2006 +++ xoops2jp/html/modules/base/class/Legacy_AdminRenderSystem.class.php Fri Jan 27 18:28:34 2006 @@ -52,28 +52,18 @@ function _fetch_resource_info(&$params) { - // - // Get dirname from root object. - // - $root =& XCube_Root::getSingleton(); - $modController =& $root->mController->getModuleController(); - $moduleObject =& $modController->getXoopsModule(); - - if ($this->mModulePrefix) { - $dirname = $this->mModulePrefix; - } - else { - $dirname = $moduleObject->getVar('dirname'); - } + $_return = false; $theme = $root->mSiteConfig['Legacy']['Theme']; - $overridePath = XOOPS_THEME_PATH . "/" . $theme . "/modules/" . $dirname; - - $params['resource_base_path'] = $overridePath; - $params['quiet'] = true; - - $_return = parent::_fetch_resource_info($params); + $dirname = $this->mModulePrefix; + + if ($dirname != null) { + $params['resource_base_path'] = $overridePath; + $params['quiet'] = true; + + $_return = parent::_fetch_resource_info($params); + } if (!$_return) { unset ($params['resource_base_path']); @@ -181,14 +171,11 @@ } $result=null; + if($target->getTemplateName()) { if ($target->getModuleName()) { $this->mSmarty->setModulePrefix($target->getModuleName()); - $this->mSmarty->template_dir = XOOPS_MODULE_PATH . "/" . $target->getModuleName() . "/". LEGACY_ADMIN_RENDER_TEMPLATE_DIRNAME; - } - else { - $this->mSmarty->setModulePrefix($this->mController->mModuleController->getModuleDir()); - $this->mSmarty->template_dir = $this->mController->mModuleController->getModuleDir() . "/". LEGACY_ADMIN_RENDER_TEMPLATE_DIRNAME; + $this->mSmarty->template_dir = XOOPS_MODULE_PATH . "/" . $target->getModuleName() . "/admin/". LEGACY_ADMIN_RENDER_TEMPLATE_DIRNAME; } $result=$this->mSmarty->fetch("file:".$target->getTemplateName());