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

Zurück zum Archiv-Index

Minahito minah****@users*****
2005年 11月 25日 (金) 13:22:12 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.3 xoops2jp/html/modules/base/class/Legacy_AdminRenderSystem.class.php:1.1.2.4
--- xoops2jp/html/modules/base/class/Legacy_AdminRenderSystem.class.php:1.1.2.3	Mon Nov 21 01:29:37 2005
+++ xoops2jp/html/modules/base/class/Legacy_AdminRenderSystem.class.php	Fri Nov 25 13:22:12 2005
@@ -1,10 +1,18 @@
 <?php
 
-require_once XOOPS_BASE_PATH."/class/Base_LegacyRenderSystem.class.php";
+//
+// TODO
+//
+require_once XOOPS_ROOT_PATH."/modules/legacyRender/kernel/Legacy_RenderSystem.class.php";
 
 define("LEGACY_ADMIN_RENDER_TEMPLATE_DIRNAME","templates");
 
-class Legacy_AdminRenderSystem extends Base_LegacyRenderSystem
+/**
+ * [TODO]
+ * We depends on Legacy_RenderSystem that a add-in module defines. We must stop
+ * this situation.
+ */
+class Legacy_AdminRenderSystem extends Legacy_RenderSystem
 {
 	var $mSmarty;
 	
@@ -52,27 +60,42 @@
 			"weight"=>$blockProcedure->getWeight());
 	}
 	
-	function display()
-	{
-		$this->sendHeader();
+	function _renderTheme(&$target)
+	{
+		$this->mController->mDebugger->displayLog();
+
+		//
+		// Assign from attributes of the render-target.
+		//
+		foreach($target->getAttributes() as $key=>$value) {
+			$this->mSmarty->assign($key,$value);
+		}
 
-		$this->_processLegacyTemplate();
-		
 		$this->mSmarty->assign("currentModule",$this->mController->mModuleController->mModuleObject);
-		
+
+		//
+		// [TODO]
+		// We must implement with a render-target.
+		//
+		$this->_processLegacyTemplate();
+
 		//
 		// Theme rendering
 		//
 		foreach($this->mBlockContents as $result) {
 			$this->mSmarty->append('xoops_lblocks',$result);
 		}
-
-
-		$this->mSmarty->template_dir=XOOPS_ROOT_PATH."/themes/admin/";
-		$this->mSmarty->display("file:admin_theme.html");
-
-		$this->mController->mDebugger->displayLog();
-	}
+
+		if($target->isTheme()) {
+			$this->mSmarty->template_dir=XOOPS_ROOT_PATH."/themes/admin/";
+			$result=$this->mSmarty->fetch("file:admin_theme.html");
+
+			$this->mRenderTarget->setResult($result);
+		}
+		else {
+			// --- ADD CODE ---
+		}
+	}
 
 	function _processStartPage()
 	{


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