[xoops-cvslog 5638] CVS update: xoops2jp/html/modules/legacy/kernel

Zurück zum Archiv-Index

Minahito minah****@users*****
2006年 11月 7日 (火) 15:35:24 JST


Index: xoops2jp/html/modules/legacy/kernel/Legacy_Controller.class.php
diff -u xoops2jp/html/modules/legacy/kernel/Legacy_Controller.class.php:1.1.2.13 xoops2jp/html/modules/legacy/kernel/Legacy_Controller.class.php:1.1.2.14
--- xoops2jp/html/modules/legacy/kernel/Legacy_Controller.class.php:1.1.2.13	Thu Nov  2 18:57:35 2006
+++ xoops2jp/html/modules/legacy/kernel/Legacy_Controller.class.php	Tue Nov  7 15:35:24 2006
@@ -320,7 +320,7 @@
 				//
 				if ($cacheInfo->isEnableCache() && $this->existActiveCacheFile($filepath, $blockProcedure->getCacheTime())) {
 					$content = $this->loadCache($filepath);
-					if ($content != null) {
+					if ($blockProcedure->isDisplay()) {
 						$context->mAttributes['legacy_BlockShowFlags'][$blockProcedure->getEntryIndex()] = true;
 						$context->mAttributes['legacy_BlockContents'][$blockProcedure->getEntryIndex()][] = array(
 							'name' => $blockProcedure->getName(),
@@ -328,29 +328,34 @@
 							'content' => $content,
 							'weight'  => $blockProcedure->getWeight()
 						);
-						
-						$usedCacheFlag = true;
 					}
+						
+					$usedCacheFlag = true;
 				}
 			}
 			
 			if (!$usedCacheFlag) {
 				$blockProcedure->execute();
 
-				if (!$blockProcedure->isDisplay()) {
-					continue;
+				$renderBuffer = null;
+				if ($blockProcedure->isDisplay()) {
+					$renderBuffer =& $blockProcedure->getRenderBuffer();
+					
+					$context->mAttributes['legacy_BlockShowFlags'][$blockProcedure->getEntryIndex()] = true;
+					$context->mAttributes['legacy_BlockContents'][$blockProcedure->getEntryIndex()][] = array(
+							'name' => $blockProcedure->getName(),
+							'title'=>$blockProcedure->getTitle(),
+							'content'=>$renderBuffer->getResult(),
+							'weight'=>$blockProcedure->getWeight()
+					);
+				}
+				else {
+					//
+					// Dummy save
+					//
+					$renderBuffer =& new XCube_RenderTarget();
 				}
 				
-				$renderBuffer =& $blockProcedure->getRenderBuffer();
-				
-				$context->mAttributes['legacy_BlockShowFlags'][$blockProcedure->getEntryIndex()] = true;
-				$context->mAttributes['legacy_BlockContents'][$blockProcedure->getEntryIndex()][] = array(
-						'name' => $blockProcedure->getName(),
-						'title'=>$blockProcedure->getTitle(),
-						'content'=>$renderBuffer->getResult(),
-						'weight'=>$blockProcedure->getWeight()
-				);
-
 				if ($this->isEnableCacheFeature() && $blockProcedure->isEnableCache() && is_object($cacheInfo) && $cacheInfo->isEnableCache()) {
 					$this->cacheRenderTarget($cacheInfo->getCacheFilePath(), $renderBuffer);
 				}


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