[xoops-cvslog 3892] CVS update: xoops2jp/html/modules/base/kernel

Zurück zum Archiv-Index

Minahito minah****@users*****
2006年 8月 3日 (木) 02:01:51 JST


Index: xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php
diff -u xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.58 xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.59
--- xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.58	Wed Aug  2 18:38:24 2006
+++ xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php	Thu Aug  3 02:01:51 2006
@@ -1,7 +1,7 @@
 <?php
 /**
  * @package Legacy
- * @version $Id: Legacy_Controller.class.php,v 1.1.2.58 2006/08/02 09:38:24 minahito Exp $
+ * @version $Id: Legacy_Controller.class.php,v 1.1.2.59 2006/08/02 17:01:51 minahito Exp $
  */
 
 if (!defined('XOOPS_ROOT_PATH')) exit();
@@ -714,20 +714,15 @@
 		// Theme Control
 		//
 		$screenTarget = $this->mDialogMode ? new Legacy_DialogRenderTarget() : new Legacy_ThemeRenderTarget();
-		$screenTarget->setTemplateName($this->getMainTheme());
 		$screenTarget->setAttribute('xoops_contents', $resultRenderTarget->getResult());
 
 		//
 		// Get the render-system through theme object.
 		//
-		// [TODO]
-		// Because get() of the virtual handler is heavy, we have to consider
-		// the new solution about this process.
-		//
-		$handler =& xoops_getmodulehandler('theme', 'base');
-		$theme =& $handler->get($this->getMainTheme());
+		$theme =& $this->_mControllerState->getMainThemeObject($this);
 
 		$renderSystem =& $this->mRoot->getRenderSystem($theme->get('render_system'));
+		$screenTarget->setTemplateName($theme->get('dirname'));
 
 		//
 		// Rendering.
@@ -1076,6 +1071,10 @@
 		$ret = null;
 		return $ret;
 	}
+	
+	function &getMainThemeObject(&$controller)
+	{
+	}
 }
 
 class BaseControllerPublicState extends BaseControllerState
@@ -1126,6 +1125,18 @@
 			unset($blockObject);
 		}
 	}
+
+	function &getMainThemeObject(&$controller)
+	{
+		// [TODO]
+		// Because get() of the virtual handler is heavy, we have to consider
+		// the new solution about this process.
+		//
+		$handler =& xoops_getmodulehandler('theme', 'base');
+		$theme =& $handler->get($controller->getMainTheme());
+		
+		return $theme;
+	}
 }
 
 class BaseControllerAdminState extends BaseControllerState
@@ -1192,6 +1203,20 @@
 
 		return $module;
 	}
+
+	function &getMainThemeObject(&$controller)
+	{
+		$handler =& xoops_getmodulehandler('theme', 'base');
+		$theme =& $handler->create();
+		
+		//
+		// TODO Load manifesto here.
+		//
+		$theme->set('dirname', $controller->mRoot->mSiteConfig['Legacy']['Theme']);
+		$theme->set('render_system', 'Legacy_AdminRenderSystem');
+		
+		return $theme;
+	}
 }
 
 ?>
\ No newline at end of file


xoops-cvslog メーリングリストの案内
Zurück zum Archiv-Index