Minahito
minah****@users*****
2006年 1月 6日 (金) 12:18:37 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.13 xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.14 --- xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.13 Thu Jan 5 17:29:36 2006 +++ xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php Fri Jan 6 12:18:37 2006 @@ -182,11 +182,14 @@ $cache->setResourceName("block" . $blockProcedure->getId()); if ($cache->isCache($blockProcedure->getCacheTime())) { - $this->mRenderSystem->mBlockContents[$blockProcedure->getEntryIndex()][] = array( - 'title' => $blockProcedure->getTitle(), - 'content' => $cache->load(), - 'weight' => $blockProcedure->getWeight() - ); + $content = $cache->load(); + if ($content) { + $this->mRenderSystem->mBlockContents[$blockProcedure->getEntryIndex()][] = array( + 'title' => $blockProcedure->getTitle(), + 'content' => $cache->load(), + 'weight' => $blockProcedure->getWeight() + ); + } } else { $blockProcedure->execute($this,$this->getXoopsUser()); @@ -210,13 +213,17 @@ } $this->mRenderSystem->renderBlock($blockTarget); - - $this->mRenderSystem->mBlockShowFlags[$blockProcedure->getEntryIndex()] = true; - $this->mRenderSystem->mBlockContents[$blockProcedure->getEntryIndex()][] = array( - 'title'=>$blockProcedure->getTitle(), - 'content'=>$blockTarget->getResult(), - 'weight'=>$blockProcedure->getWeight() - ); + + $content = $blockTarget->getResult(); + + if ($content) { + $this->mRenderSystem->mBlockShowFlags[$blockProcedure->getEntryIndex()] = true; + $this->mRenderSystem->mBlockContents[$blockProcedure->getEntryIndex()][] = array( + 'title'=>$blockProcedure->getTitle(), + 'content'=>$blockTarget->getResult(), + 'weight'=>$blockProcedure->getWeight() + ); + } if ($blockProcedure->getCacheTime() > 0) { $cache->save($blockTarget);