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

Back to archive index

Minahito minah****@users*****
2006年 1月 25日 (水) 12:44:03 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.13 xoops2jp/html/modules/base/class/Legacy_AdminRenderSystem.class.php:1.1.2.14
--- xoops2jp/html/modules/base/class/Legacy_AdminRenderSystem.class.php:1.1.2.13	Wed Jan 11 12:32:23 2006
+++ xoops2jp/html/modules/base/class/Legacy_AdminRenderSystem.class.php	Wed Jan 25 12:44:03 2006
@@ -58,8 +58,14 @@
 		$root =& XCube_Root::getSingleton();
 		$modController =& $root->mController->getModuleController();
 		$moduleObject =& $modController->getXoopsModule();
-		$dirname = $moduleObject->getVar('dirname');
 		
+		if ($this->mModulePrefix) {
+			$dirname = $this->mModulePrefix;
+		}
+		else {
+			$dirname = $moduleObject->getVar('dirname');
+		}
+
 		$theme = $root->mSiteConfig['Legacy']['Theme'];
 
 		$overridePath = XOOPS_THEME_PATH . "/" . $theme . "/modules/" . $dirname;
@@ -72,10 +78,10 @@
 		if (!$_return) {
 			unset ($params['resource_base_path']);
 			$params['quiet'] = false;
-
+			
 			$_return = parent::_fetch_resource_info($params);
 		}
-
+		
 		return $_return;
 	}
 	
@@ -176,9 +182,16 @@
 
 		$result=null;
 		if($target->getTemplateName()) {
-			$this->mSmarty->template_dir=$this->mController->mModuleController->getModuleDir() . "/". LEGACY_ADMIN_RENDER_TEMPLATE_DIRNAME;
-			$this->mSmarty->setModulePrefix($this->mController->mModuleController->getModuleDir());
-			$result=$this->mSmarty->fetch("file:".$this->mTemplateName);
+			if ($target->getModuleName()) {
+				$this->mSmarty->setModulePrefix($target->getModuleName());
+				$this->mSmarty->template_dir = XOOPS_MODULE_PATH . "/" . $target->getModuleName() . "/". LEGACY_ADMIN_RENDER_TEMPLATE_DIRNAME;
+			}
+			else {
+				$this->mSmarty->setModulePrefix($this->mController->mModuleController->getModuleDir());
+				$this->mSmarty->template_dir = $this->mController->mModuleController->getModuleDir() . "/". LEGACY_ADMIN_RENDER_TEMPLATE_DIRNAME;
+			}
+			
+			$result=$this->mSmarty->fetch("file:".$target->getTemplateName());
 		}
 		else {
 			$result=$target->getAttribute("stdout_buffer");


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