Minahito
minah****@users*****
2006年 8月 2日 (水) 18:45:47 JST
Index: xoops2jp/html/modules/legacyRender/kernel/DelegateFunctions.class.php diff -u /dev/null xoops2jp/html/modules/legacyRender/kernel/DelegateFunctions.class.php:1.1.2.1 --- /dev/null Wed Aug 2 18:45:47 2006 +++ xoops2jp/html/modules/legacyRender/kernel/DelegateFunctions.class.php Wed Aug 2 18:45:47 2006 @@ -0,0 +1,51 @@ +<?php +/** + * @package legacyRender + * @version $Id: DelegateFunctions.class.php,v 1.1.2.1 2006/08/02 09:45:47 minahito Exp $ + */ + +if (!defined('XOOPS_ROOT_PATH')) exit(); + +require_once XOOPS_ROOT_PATH . "/kernel/XCube_Theme.class.php"; + +class LegacyRender_DelegateFunctions +{ + /** + * Search themes that Legacy_RenderSystem can render in file system. + */ + function getInstalledThemes(&$results) + { + if ($handler = opendir(XOOPS_THEME_PATH)) { + while (($dirname = readdir($handler)) !== false) { + if ($dirname == "." || $dirname == "..") { + continue; + } + + $themeDir = XOOPS_THEME_PATH . "/" . $dirname; + if (is_dir($themeDir)) { + $theme =& new XCube_Theme(); + $theme->mDirname = $dirname; + + if ($theme->loadManifesto($themeDir . "/package.ini.php")) { + if ($theme->mRenderSystemName == 'Legacy_RenderSystem') { + $results[] =& $theme; + } + } + else { + if (file_exists($themeDir . "/theme.html")) { + $theme->mName = $dirname; + $theme->mRenderSystemName = 'Legacy_RenderSystem'; + $theme->mFormat = "XOOPS2 Legacy Style"; + $results[] =& $theme; + } + } + + unset($theme); + } + } + closedir($handler); + } + } +} + +?> \ No newline at end of file