Minahito
minah****@users*****
2006年 11月 10日 (金) 18:11:33 JST
Index: xoops2jp/html/modules/legacyRender/class/theme.php diff -u xoops2jp/html/modules/legacyRender/class/theme.php:1.1.2.5 xoops2jp/html/modules/legacyRender/class/theme.php:1.1.2.5.2.1 --- xoops2jp/html/modules/legacyRender/class/theme.php:1.1.2.5 Thu Aug 3 23:05:41 2006 +++ xoops2jp/html/modules/legacyRender/class/theme.php Fri Nov 10 18:11:32 2006 @@ -17,11 +17,19 @@ function loadPackage() { - $mnfFile = XOOPS_THEME_PATH . "/" . $this->get('name') . "/package.ini.php"; - - if (file_exists($mnfFile)) { + $themeDir = XOOPS_THEME_PATH . "/" . $this->get('name'); + + if (file_exists($mnfFile = $themeDir . "/manifesto.ini.php")) { $this->mPackage = parse_ini_file($mnfFile, true); - + } + elseif (file_exists($mnfFile = $themeDir . "/package.ini.php")) { + $this->mPackage = parse_ini_file($mnfFile, true); + } + + if (isset($this->mPackage['Manifesto'])) { + // + // If this system can use this theme, add this to list. + // if (isset($this->mPackage['Manifesto']) && isset($this->mPackage['Manifesto']['Depends'])) { $this->mActiveResource = ($this->mPackage['Manifesto']['Depends'] == "Legacy_RenderSystem"); } @@ -72,10 +80,15 @@ $themeDir=XOOPS_THEME_PATH."/".$dir; if(is_dir($themeDir)) { - $mnfFile=$themeDir."/package.ini.php"; - if(file_exists($mnfFile)) { - $manifesto=parse_ini_file($mnfFile,true); - + $manifesto = array(); + if (file_exists($mnfFile = $themeDir . "/manifesto.ini.php")) { + $manifesto = parse_ini_file($mnfFile, true); + } + elseif (file_exists($mnfFile = $themeDir . "/package.ini.php")) { + $manifesto = parse_ini_file($mnfFile, true); + } + + if(count($manifesto) > 0) { // // If this system can use this theme, add this to list. //