[xoops-cvslog 4926] CVS update: xoops2jp/html/modules/legacyRender/kernel

Back to archive index

Minahito minah****@users*****
2006年 10月 11日 (水) 17:11:19 JST


Index: xoops2jp/html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php
diff -u xoops2jp/html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php:1.1.2.30.2.2 xoops2jp/html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php:1.1.2.30.2.3
--- xoops2jp/html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php:1.1.2.30.2.2	Thu Oct  5 18:09:58 2006
+++ xoops2jp/html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php	Wed Oct 11 17:11:19 2006
@@ -1,6 +1,6 @@
 <?php
 /**
- * @version $Id: Legacy_RenderSystem.class.php,v 1.1.2.30.2.2 2006/10/05 09:09:58 minahito Exp $
+ * @version $Id: Legacy_RenderSystem.class.php,v 1.1.2.30.2.3 2006/10/11 08:11:19 minahito Exp $
  */
 
 if (!defined('XOOPS_ROOT_PATH')) exit();
@@ -17,9 +17,6 @@
 {
 	var $mXoopsTpl;
 
-	var $mBlockShowFlags;
-	var $mBlockContents;
-	
 	/**
 	 * Temporary
 	 */
@@ -35,7 +32,6 @@
 	function Legacy_RenderSystem()
 	{
 		parent::XCube_RenderSystem();
-		$this->mBlockContents = array();
 	}
 	
 	function prepare(&$controller)
@@ -197,7 +193,7 @@
 		//
 		// The following lines are temporary until we will finish changing the style!
 		//
-		switch ($target->getType()) {
+		switch ($target->getAttribute('legacy_buffertype')) {
 			case XCUBE_RENDER_TARGET_TYPE_BLOCK:
 				$this->renderBlock($target);
 				break;
@@ -285,8 +281,8 @@
 
 		foreach($assignNameMap as $key=>$val) {
 			$this->mXoopsTpl->assign($val['showflag'],$this->_getBlockShowFlag($val['showflag']));
-			if(isset($this->mController->mBlockContents[$key])) {
-				foreach($this->mController->mBlockContents[$key] as $result) {
+			if(isset($this->mController->mRoot->mContext->mAttributes['legacy_BlockContents'][$key])) {
+				foreach($this->mController->mRoot->mContext->mAttributes['legacy_BlockContents'][$key] as $result) {
 					$this->mXoopsTpl->append($val['block'], $result);
 				}
 			}
@@ -312,17 +308,17 @@
 		switch($area) {
 			case 'xoops_showrblock' :
 				if (isset($GLOBALS['show_rblock']) && empty($GLOBALS['show_rblock'])) return 0;
-				return (!empty($this->mController->mBlockShowFlags[XOOPS_SIDEBLOCK_RIGHT])) ? 1 : 0;
+				return (!empty($this->mController->mRoot->mContext->mAttributes['legacy_BlockShowFlags'][XOOPS_SIDEBLOCK_RIGHT])) ? 1 : 0;
 				break;
 			case 'xoops_showlblock' :
 				if (isset($GLOBALS['show_lblock']) && empty($GLOBALS['show_lblock'])) return 0;
-				return (!empty($this->mController->mBlockShowFlags[XOOPS_SIDEBLOCK_LEFT])) ? 1 : 0;
+				return (!empty($this->mController->mRoot->mContext->mAttributes['legacy_BlockShowFlags'][XOOPS_SIDEBLOCK_LEFT])) ? 1 : 0;
 				break;
 			case 'xoops_showcblock' :
 				if (isset($GLOBALS['show_cblock']) && empty($GLOBALS['show_cblock'])) return 0;
-				return (!empty($this->mController->mBlockShowFlags[XOOPS_CENTERBLOCK_LEFT])||
-				        !empty($this->mController->mBlockShowFlags[XOOPS_CENTERBLOCK_RIGHT])||
-				        !empty($this->mController->mBlockShowFlags[XOOPS_CENTERBLOCK_CENTER])) ? 1 : 0;
+				return (!empty($this->mController->mRoot->mContext->mAttributes['legacy_BlockShowFlags'][XOOPS_CENTERBLOCK_LEFT])||
+				        !empty($this->mController->mRoot->mContext->mAttributes['legacy_BlockShowFlags'][XOOPS_CENTERBLOCK_RIGHT])||
+				        !empty($this->mController->mRoot->mContext->mAttributes['legacy_BlockShowFlags'][XOOPS_CENTERBLOCK_CENTER])) ? 1 : 0;
 				break;
 			default :
 				return 0;
@@ -415,7 +411,7 @@
 		$this->_renderFooter();
 	}
 
-	function &createRenderTarget($type = XCUBE_RENDER_TARGET_TYPE_MAIN)
+	function &createRenderTarget($type = LEGACY_RENDER_TARGET_TYPE_MAIN, $option = null)
 	{
 		$renderTarget = null;
 		switch ($type) {
@@ -423,9 +419,13 @@
 				$renderTarget =& new Legacy_RenderTargetMain();
 				break;
 				
+			case LEGACY_RENDER_TARGET_TYPE_BLOCK:
+				$renderTarget =& new XCube_RenderTarget();
+				$renderTarget->setAttribute('legacy_buffertype', LEGACY_RENDER_TARGET_TYPE_BLOCK);
+				break;
+				
 			default:
 				$renderTarget =& new XCube_RenderTarget();
-				$renderTarget->setType($type);
 				break;
 		}
 
@@ -444,14 +444,14 @@
 
 function LegacyRender_smartyfunction_notifications_select($params, &$smarty)
 {
-	$renderTarget =& new XCube_RenderTarget();
-	$renderTarget->setType(XCUBE_RENDER_TARGET_TYPE_MAIN);
+	$root =& XCube_Root::getSingleton();
+	$renderSystem =& $root->getRenderSystem('Legacy_RenderSystem');
+	
+	$renderTarget =& $renderSystem->createRenderTarget('main');
 	$renderTarget->setTemplateName("legacy_notification_select_form.html");
 
 	XCube_DelegateUtils::call('Legacyfunction.Notifications.Select', new XCube_Ref($renderTarget));
 
-	$root =& XCube_Root::getSingleton();
-	$renderSystem =& $root->getRenderSystem('Legacy_RenderSystem');
 	$renderSystem->renderWithTarget($renderTarget);
 	
 	return $renderTarget->getResult();


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