[xoops-cvslog 1567] CVS update: xoops2jp/html/modules/base/class

Back to archive index

Minahito minah****@users*****
2006年 1月 5日 (木) 17:29:00 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.11 xoops2jp/html/modules/base/class/Legacy_AdminRenderSystem.class.php:1.1.2.12
--- xoops2jp/html/modules/base/class/Legacy_AdminRenderSystem.class.php:1.1.2.11	Fri Dec 30 17:26:24 2005
+++ xoops2jp/html/modules/base/class/Legacy_AdminRenderSystem.class.php	Thu Jan  5 17:29:00 2006
@@ -6,7 +6,6 @@
 require_once XOOPS_ROOT_PATH."/modules/legacyRender/kernel/Legacy_RenderSystem.class.php";
 
 define('LEGACY_ADMIN_RENDER_TEMPLATE_DIRNAME', "templates");
-define('_TMP_THEME_NAME', "admin");
 
 define('LEGACY_ADMIN_RENDER_FALLBACK_PATH', XOOPS_MODULE_PATH . "/base/admin/theme");
 define('LEGACY_ADMIN_RENDER_FALLBACK_URL', XOOPS_MODULE_URL . "/base/admin/theme");
@@ -60,8 +59,10 @@
 		$modController =& $root->mController->getModuleController();
 		$moduleObject =& $modController->getXoopsModule();
 		$dirname = $moduleObject->getVar('dirname');
+		
+		$theme = $root->mSiteConfig['Legacy']['Theme'];
 
-		$overridePath = XOOPS_THEME_PATH . "/" . _TMP_THEME_NAME . "/modules/" . $dirname;
+		$overridePath = XOOPS_THEME_PATH . "/" . $theme . "/modules/" . $dirname;
 
 		$params['resource_base_path'] = $overridePath;
 		$params['quiet'] = true;
@@ -145,8 +146,11 @@
 		//
 		// Check Theme or Fallback
 		//
-		if (file_exists(XOOPS_ROOT_PATH."/themes/"._TMP_THEME_NAME."/admin_theme.html")) {
-			$this->mSmarty->template_dir=XOOPS_THEME_PATH."/"._TMP_THEME_NAME;
+		$root =& XCube_Root::getSingleton();
+		$theme = $root->mSiteConfig['Legacy']['Theme'];
+		
+		if (file_exists(XOOPS_ROOT_PATH."/themes/".$theme."/admin_theme.html")) {
+			$this->mSmarty->template_dir=XOOPS_THEME_PATH."/".$theme;
 		}
 		else {
 			$this->mSmarty->template_dir=LEGACY_ADMIN_RENDER_FALLBACK_PATH;
@@ -194,11 +198,13 @@
 	$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 . "/" . _TMP_THEME_NAME . "/" . $string;
+		$themePath = XOOPS_THEME_PATH . "/" . $theme . "/" . $string;
 		if (file_exists($themePath)) {
-			return XOOPS_THEME_URL . "/" . _TMP_THEME_NAME . "/" . $string;
+			return XOOPS_THEME_URL . "/" . $theme . "/" . $string;
 		}
 
 		return LEGACY_ADMIN_RENDER_FALLBACK_URL . "/" . $string;
@@ -207,14 +213,14 @@
 		$dirname = $moduleObject->getVar('dirname');
 
 		// TODO We must remove Hard-Coding
-		$themePath = XOOPS_THEME_PATH . "/" . _TMP_THEME_NAME . "/modules/" . $dirname . "/" . $string;
+		$themePath = XOOPS_THEME_PATH . "/" . $theme . "/modules/" . $dirname . "/" . $string;
 		if (file_exists($themePath)) {
-			return XOOPS_THEME_URL . "/" . _TMP_THEME_NAME . "/modules/" . $dirname . "/" . $string;
+			return XOOPS_THEME_URL . "/" . $theme . "/modules/" . $dirname . "/" . $string;
 		}
 
-		$themePath = XOOPS_THEME_PATH . "/" . _TMP_THEME_NAME . "/" . $string;
+		$themePath = XOOPS_THEME_PATH . "/" . $theme . "/" . $string;
 		if (file_exists($themePath)) {
-			return XOOPS_THEME_URL . "/" . _TMP_THEME_NAME . "/" . $string;
+			return XOOPS_THEME_URL . "/" . $theme . "/" . $string;
 		}
 
 		$modulePath = XOOPS_MODULE_PATH . "/" . $dirname . "/admin/templates/" . $string;
@@ -231,12 +237,12 @@
 {
 	$file = $params['file'];
 
-	$theme = null;
+	$root =& XCube_Root::getSingleton();
+	$theme = $root->mSiteConfig['Legacy']['Theme'];
 
 	// TODO We must remove Hard-Coding
-	$themePath = XOOPS_THEME_PATH . "/" . _TMP_THEME_NAME . "/" . $file;
+	$themePath = XOOPS_THEME_PATH . "/" . $theme . "/" . $file;
 	if (file_exists($themePath)) {
-		$theme = _TMP_THEME_NAME;
 		$url = XOOPS_MODULE_URL . "/base/admin/css.php?theme=${theme}&file=${file}";
 	}
 	else {


xoops-cvslog メーリングリストの案内
Back to archive index