Minahito
minah****@users*****
2006年 8月 3日 (木) 18:39:12 JST
Index: xoops2jp/html/modules/base/kernel/Legacy_AdminRenderSystem.class.php diff -u xoops2jp/html/modules/base/kernel/Legacy_AdminRenderSystem.class.php:1.1.2.7 xoops2jp/html/modules/base/kernel/Legacy_AdminRenderSystem.class.php:1.1.2.8 --- xoops2jp/html/modules/base/kernel/Legacy_AdminRenderSystem.class.php:1.1.2.7 Thu Aug 3 02:47:25 2006 +++ xoops2jp/html/modules/base/kernel/Legacy_AdminRenderSystem.class.php Thu Aug 3 18:39:12 2006 @@ -1,4 +1,7 @@ <?php +/** + * @package Legacy + */ if (!defined('XOOPS_ROOT_PATH')) exit(); @@ -115,20 +118,20 @@ function renderBlock(&$target) { - $this->mSmarty->template_dir=XOOPS_ROOT_PATH."/modules/base/admin/templates"; + $this->mSmarty->template_dir = XOOPS_ROOT_PATH . "/modules/base/admin/templates"; - foreach($target->getAttributes() as $key=>$value) { - $this->mSmarty->assign($key,$value); + foreach ($target->getAttributes() as $key => $value) { + $this->mSmarty->assign($key, $value); } $this->mSmarty->setModulePrefix("base"); - $result = $this->mSmarty->fetch("blocks/".$target->getTemplateName()); + $result = $this->mSmarty->fetch("blocks/" . $target->getTemplateName()); $target->setResult($result); - + // // Reset // - foreach($target->getAttributes() as $key=>$value) { + foreach($target->getAttributes() as $key => $value) { $this->mSmarty->clear_assign($key); } } @@ -151,9 +154,12 @@ // // Theme rendering // - foreach($this->mBlockContents[0] as $result) { - $this->mSmarty->append('xoops_lblocks',$result); + $blocks = array(); + foreach($this->mController->mBlockContents[0] as $key => $result) { + // $this->mSmarty->append('xoops_lblocks', $result); + $blocks[$result['name']] = $result; } + $this->mSmarty->assign('xoops_lblocks', $blocks); // // Check Theme or Fallback @@ -179,13 +185,13 @@ // // Assign from attributes of the render-target. // - foreach($target->getAttributes() as $key=>$value) { - $this->mSmarty->assign($key,$value); + foreach ($target->getAttributes() as $key=>$value) { + $this->mSmarty->assign($key, $value); } - - $result=null; - if($target->getTemplateName()) { + $result = null; + + if ($target->getTemplateName()) { if ($target->getModuleName()) { $this->mSmarty->setModulePrefix($target->getModuleName()); $this->mSmarty->template_dir = XOOPS_MODULE_PATH . "/" . $target->getModuleName() . "/admin/". LEGACY_ADMIN_RENDER_TEMPLATE_DIRNAME; @@ -198,6 +204,13 @@ } $target->setResult($result); + + // + // Clear assign. + // + foreach ($target->getAttributes() as $key=>$value) { + $this->mSmarty->clear_assign($key); + } } }