Minahito
minah****@users*****
2006年 4月 28日 (金) 18:28:33 JST
Index: xoops2jp/html/modules/base/kernel/Legacy_AdminRenderSystem.class.php diff -u xoops2jp/html/modules/base/kernel/Legacy_AdminRenderSystem.class.php:1.1.2.5 xoops2jp/html/modules/base/kernel/Legacy_AdminRenderSystem.class.php:1.1.2.6 --- xoops2jp/html/modules/base/kernel/Legacy_AdminRenderSystem.class.php:1.1.2.5 Fri Apr 28 18:17:44 2006 +++ xoops2jp/html/modules/base/kernel/Legacy_AdminRenderSystem.class.php Fri Apr 28 18:28:33 2006 @@ -211,42 +211,19 @@ */ function Legacy_modifier_theme($string) { - $root =& XCube_Root::getSingleton(); - $modController =& $root->mController->getModuleController(); - $moduleObject =& $modController->getXoopsModule(); - - $theme = $root->mSiteConfig['Legacy']['Theme']; - - if (!is_object($moduleObject)) { - // TODO We must remove Hard-Coding - $themePath = XOOPS_THEME_PATH . "/" . $theme . "/" . $string; - if (file_exists($themePath)) { - return XOOPS_THEME_URL . "/" . $theme . "/" . $string; - } - - return LEGACY_ADMIN_RENDER_FALLBACK_URL . "/" . $string; + $infoArr = Legacy_get_ovveride_file($string); + + if ($infoArr['theme'] != null && $infoArr['dirname'] != null) { + return XOOPS_THEME_URL . "/" . $infoArr['theme'] . "/modules/" . $infoArr['dirname'] . "/" . $string; } - else { - $dirname = $moduleObject->getVar('dirname'); - - // TODO We must remove Hard-Coding - $themePath = XOOPS_THEME_PATH . "/" . $theme . "/modules/" . $dirname . "/" . $string; - if (file_exists($themePath)) { - return XOOPS_THEME_URL . "/" . $theme . "/modules/" . $dirname . "/" . $string; - } - - $themePath = XOOPS_THEME_PATH . "/" . $theme . "/" . $string; - if (file_exists($themePath)) { - return XOOPS_THEME_URL . "/" . $theme . "/" . $string; - } - - $modulePath = XOOPS_MODULE_PATH . "/" . $dirname . "/admin/templates/" . $string; - if (file_exists($modulePath)) { - return XOOPS_MODULE_URL . "/" . $dirname . "/admin/templates/" . $string; - } - - return LEGACY_ADMIN_RENDER_FALLBACK_URL . "/" . $string; + elseif ($infoArr['theme'] != null) { + return XOOPS_THEME_URL . "/" . $infoArr['theme'] . "/" . $string; + } + elseif ($infoArr['dirname'] != null) { + return XOOPS_MODULE_URL . "/" . $infoArr['dirname'] . "/admin/templates/" . $string; } + + return LEGACY_ADMIN_RENDER_FALLBACK_URL . "/" . $string; } function Legacy_function_stylesheet($params, &$smarty)