Minahito
minah****@users*****
2006年 7月 14日 (金) 14:24:18 JST
Index: xoops2jp/html/modules/user/admin/actions/GroupPropertyAction.class.php diff -u xoops2jp/html/modules/user/admin/actions/GroupPropertyAction.class.php:1.1.2.6 xoops2jp/html/modules/user/admin/actions/GroupPropertyAction.class.php:1.1.2.7 --- xoops2jp/html/modules/user/admin/actions/GroupPropertyAction.class.php:1.1.2.6 Thu May 18 23:04:04 2006 +++ xoops2jp/html/modules/user/admin/actions/GroupPropertyAction.class.php Fri Jul 14 14:24:18 2006 @@ -1,14 +1,18 @@ <?php +/** + * @package user + * @version $Id: GroupPropertyAction.class.php,v 1.1.2.7 2006/07/14 05:24:18 minahito Exp $ + */ if (!defined('XOOPS_ROOT_PATH')) exit(); require_once XOOPS_ROOT_PATH."/class/XCube_PageNavigator.class.php"; require_once XOOPS_MODULE_PATH."/user/admin/class/Permission.class.php"; -require_once XOOPS_MODULE_PATH."/user/admin/class/XoopsGroupEx.class.php"; /** * - * This function keeps difficult problems that this depens on the column's block of X2 theme format. + * This function keeps difficult problems that this depens on the column's + * block of X2 theme format. */ class User_GroupPropertyAction extends User_Action { @@ -20,11 +24,6 @@ var $mUsers; var $mPageNavi; - function isSecure() - { - return true; - } - function getDefaultView(&$controller, &$xoopsUser) { $this->_loadGroup(); @@ -43,7 +42,7 @@ $memberHandler =& xoops_gethandler('member'); $total = $memberHandler->getUserCountByGroup($this->mGroup->getVar('groupid')); - $this->mPageNavi=new XCube_PageNavigator("./index.php?action=RankList",$total,XCUBE_PAGENAVI_START | XCUBE_PAGENAVI_PERPAGE); // TODO get controller->getUrl() ? + $this->mPageNavi =& new XCube_PageNavigator("./index.php?action=RankList", $total, XCUBE_PAGENAVI_START | XCUBE_PAGENAVI_PERPAGE); // TODO get controller->getUrl() ? $this->mPageNavi->fetch(); @@ -54,7 +53,7 @@ // Get... // if (file_exists(XOOPS_ROOT_PATH . "/modules/system/constants.php")) { - if($moduleHandler->getByDirname('system')) { + if ($moduleHandler->getByDirname('system')) { require_once XOOPS_ROOT_PATH . "/modules/system/constants.php"; $fileHandler = opendir(XOOPS_ROOT_PATH . "/modules/system/admin"); while ($file = readdir($fileHandler)) { @@ -111,24 +110,21 @@ function _loadGroup() { - $groupId = isset($_REQUEST['groupid']) ? intval($_REQUEST['groupid']) : 0; + $id = xoops_getrequest('groupid'); - $groupHandler =& xoops_gethandler('group'); - $group =& $groupHandler->get($groupId); - if (is_object($group)) { - $this->mGroup =& new XoopsGroupEx($group); - } + $handler =& xoops_getmodulehandler('groups'); + $this->mGroup =& $handler->get($id); } function executeViewIndex(&$controller,&$xoopsUser,&$render) { $render->setTemplateName("group_property.html"); - $render->setAttribute("group",$this->mGroup); - $render->setAttribute("modulePermissions",$this->mPermissions); - $render->setAttribute("blockPermissions",$this->mBlockPermissions); - $render->setAttribute("systemPermissions",$this->mSystemPermissions); - $render->setAttribute("users",$this->mUsers); - $render->setAttribute("pageNavi",$this->mPageNavi); + $render->setAttribute("group", $this->mGroup); + $render->setAttribute("modulePermissions", $this->mPermissions); + $render->setAttribute("blockPermissions", $this->mBlockPermissions); + $render->setAttribute("systemPermissions", $this->mSystemPermissions); + $render->setAttribute("users", $this->mUsers); + $render->setAttribute("pageNavi", $this->mPageNavi); } }