Minahito
minah****@users*****
2006年 10月 5日 (木) 18:09:44 JST
Index: xoops2jp/html/modules/base/preload/Primary/SiteClose.class.php diff -u xoops2jp/html/modules/base/preload/Primary/SiteClose.class.php:1.1.2.6.2.1 xoops2jp/html/modules/base/preload/Primary/SiteClose.class.php:1.1.2.6.2.2 --- xoops2jp/html/modules/base/preload/Primary/SiteClose.class.php:1.1.2.6.2.1 Thu Sep 28 14:03:56 2006 +++ xoops2jp/html/modules/base/preload/Primary/SiteClose.class.php Thu Oct 5 18:09:44 2006 @@ -1,7 +1,7 @@ <?php /** * @package Legacy - * @version $Id: SiteClose.class.php,v 1.1.2.6.2.1 2006/09/28 05:03:56 minahito Exp $ + * @version $Id: SiteClose.class.php,v 1.1.2.6.2.2 2006/10/05 09:09:44 minahito Exp $ */ if (!defined('XOOPS_ROOT_PATH')) exit(); @@ -14,7 +14,7 @@ function preBlockFilter() { if (($this->mController->mConfig['closesite'] == 1) || is_array(Legacy_Utils::checkSystemModules())) { - $this->mController->mSetupUser->add("Legacy_Controller.SetupUser", "Legacy_SiteClose::callbackSetupUser", XCUBE_DELEGATE_PRIORITY_FINAL); + $this->mController->mSetupUser->add("Legacy_SiteClose::callbackSetupUser", XCUBE_DELEGATE_PRIORITY_FINAL); $this->mRoot->mDelegateManager->add("Site.CheckLogin.Success", array(&$this, "callbackCheckLoginSuccess")); } } @@ -27,7 +27,7 @@ */ function callbackSetupUser(&$principal, &$controller, &$context) { - $retArray = XCube_Utils::checkSystemModules(); + $retArray = Legacy_Utils::checkSystemModules(); $accessAllowFlag = false; if (!empty($_POST['xoops_login'])) { @@ -37,8 +37,8 @@ $controller->checkLogin(); return; - } elseif (is_object($controller->mXoopsUser)) { - foreach ($controller->mXoopsUser->getGroups() as $group) { + } elseif (is_object($context->mXoopsUser)) { + foreach ($context->mXoopsUser->getGroups() as $group) { if (in_array($group, $controller->mConfig['closesite_okgrp']) || XOOPS_GROUP_ADMIN == $group) { $accessAllowFlag = true; break; @@ -48,8 +48,8 @@ // @todo Devide following lines to another preload file if ($accessAllowFlag && is_array($retArray)) { - if (in_array(XOOPS_GROUP_ADMIN, $controller->mXoopsUser->getGroups())) { - $GLOBALS['xoopsUser'] = $controller->mXoopsUser; + if (in_array(XOOPS_GROUP_ADMIN, $context->mXoopsUser->getGroups())) { + $GLOBALS['xoopsUser'] = $context->mXoopsUser; if (!empty($_POST['cube_module_install'])) { //@todo use Ticket require_once XOOPS_BASE_PATH . "/admin/class/ModuleInstaller.class.php"; if (isset($_POST['uninstalled_modules']) && is_array($_POST['uninstalled_modules'])){