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

Back to archive index

Minahito minah****@users*****
2005年 12月 22日 (木) 20:23:15 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.8 xoops2jp/html/modules/base/class/Legacy_AdminRenderSystem.class.php:1.1.2.9
--- xoops2jp/html/modules/base/class/Legacy_AdminRenderSystem.class.php:1.1.2.8	Fri Dec 16 19:01:57 2005
+++ xoops2jp/html/modules/base/class/Legacy_AdminRenderSystem.class.php	Thu Dec 22 20:23:15 2005
@@ -140,9 +140,45 @@
  */
 function Legacy_modifier_theme($string)
 {
-	// TEST
-	// I will modify this function to oveeride system.
-	return XOOPS_THEME_URL."/admin/".$string;
+	$root =& XCube_Root::getSingleton();
+	$modController =& $root->mController->getModuleController();
+	$moduleObject =& $modController->getXoopsModule();
+
+	if (!is_object($moduleObject)) {
+		// TODO We must remove Hard-Coding
+		$themePath = XOOPS_THEME_PATH . "/admin/" . $string;
+		if (file_exists($themePath)) {
+			return XOOPS_THEME_URL . "/admin/" . $string;
+		}
+
+		// TEMP
+		// TODO We must return FALLBACK_URL here.
+		return "hoge";
+	}
+	else {
+		$dirname = $moduleObject->getVar('dirname');
+
+		// TODO We must remove Hard-Coding
+		$themePath = XOOPS_THEME_PATH . "/admin/modules/" . $dirname . "/" . $string;
+		if (file_exists($themePath)) {
+			return XOOPS_THEME_URL . "/admin/modules/" . $dirname . "/" . $string;
+		}
+
+		$themePath = XOOPS_THEME_PATH . "/admin/" . $string;
+		if (file_exists($themePath)) {
+			return XOOPS_THEME_URL . "/admin/" . $string;
+		}
+
+		$modulePath = XOOPS_MODULE_PATH . "/" . $moduleObject->getVar('dirname') . "/admin/templates/" . $string;
+
+		if (file_exists($modulePath)) {
+			return XOOPS_MODULE_URL . "/" . $moduleObject->getVar('dirname') . "/admin/templates/" . $string;
+		}
+
+		// TEMP
+		// TODO We must return FALLBACK_URL here.
+		return "fallback";
+	}
 }
 
 ?>
\ No newline at end of file


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