Minahito
minah****@users*****
2006年 1月 3日 (火) 00:05:17 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.11 xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.12 --- xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.11 Sun Jan 1 21:27:02 2006 +++ xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php Tue Jan 3 00:05:17 2006 @@ -333,7 +333,7 @@ if(defined("OH_MY_GOD_HELP_ME")) $debug_mode = XOOPS_DEBUG_PHP; - $this->mDebugger=&XoopsDebuggerManager::getInstance($this->mConfig['debug_mode']); + $this->mDebugger=&XoopsDebuggerManager::getInstance($debug_mode); $this->mDebugger->setup(); $GLOBALS['xoopsDebugger']=&$this->mDebugger; @@ -645,13 +645,26 @@ $mid=$controller->mModuleController->mModuleObject->getVar('mid'); } else { - $showFlag = !empty($_GLOBALS['xoopsOption']['show_cblock']); + // + // If you does not have module_contoller, this request is to toppage. + // + $mid = -1; } + $showCenterFlag = (SHOW_CENTERBLOCK_LEFT | SHOW_CENTERBLOCK_CENTER | SHOW_CENTERBLOCK_RIGHT); + if (isset($_GLOBALS['xoopsOption']['show_cblock']) && !$_GLOBALS['xoopsOption']['show_cblock']) + $showCenterFlag = 0; + + $showRightFlag = SHOW_SIDEBLOCK_RIGHT; + if (isset($_GLOBALS['xoopsOption']['show_rblock']) && !$_GLOBALS['xoopsOption']['show_rblock']) + $showRightFlag = 0; + + $showFlag = SHOW_SIDEBLOCK_LEFT | $showRightFlag | $showCenterFlag; + $groups = is_object($controller->mXoopsUser) ? $controller->mXoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS; $xoopsblock = new XoopsBlock(); - $blockObjects=&$xoopsblock->getAllByGroupModule($groups, $mid, $showFlag, XOOPS_BLOCK_VISIBLE); + $blockObjects=&$xoopsblock->getBlocks($groups, $mid, SHOW_SIDEBLOCK_LEFT | SHOW_SIDEBLOCK_RIGHT); foreach($blockObjects as $blockObject) { $controller->mBlockChain[]=new XCube_LegacyAdaptBlockProcedure($blockObject);