Minahito
minah****@users*****
2006年 7月 13日 (木) 19:43:19 JST
Index: xoops2jp/html/modules/user/admin/actions/GroupDeleteAction.class.php diff -u xoops2jp/html/modules/user/admin/actions/GroupDeleteAction.class.php:1.1.2.2 xoops2jp/html/modules/user/admin/actions/GroupDeleteAction.class.php:1.1.2.3 --- xoops2jp/html/modules/user/admin/actions/GroupDeleteAction.class.php:1.1.2.2 Tue Mar 28 22:31:14 2006 +++ xoops2jp/html/modules/user/admin/actions/GroupDeleteAction.class.php Thu Jul 13 19:43:19 2006 @@ -1,44 +1,48 @@ <?php +/** + * @package user + * @version $Id: GroupDeleteAction.class.php,v 1.1.2.3 2006/07/13 10:43:19 minahito Exp $ + */ if (!defined('XOOPS_ROOT_PATH')) exit(); require_once XOOPS_MODULE_PATH . "/user/class/AbstractDeleteAction.class.php"; require_once XOOPS_MODULE_PATH . "/user/admin/forms/GroupAdminDeleteForm.class.php"; -require_once XOOPS_MODULE_PATH . "/user/admin/class/XoopsGroupEx.class.php"; class User_GroupDeleteAction extends User_AbstractDeleteAction { function _getId() { - return isset($_REQUEST['groupid']) ? $_REQUEST['groupid'] : 0; + return xoops_getrequest('groupid'); } function &_getHandler() { - $handler =& xoops_gethandler('group'); + $handler =& xoops_getmodulehandler('groups'); return $handler; } function _setupActionForm() { - $this->mActionForm =& new GroupAdminDeleteForm(); + $this->mActionForm =& new User_GroupAdminDeleteForm(); $this->mActionForm->prepare(); } function _doExecute() { + $handler =& xoops_gethandler('group'); + $group =& $handler->get($this->mObject->get('groupid')); + $handler =& xoops_gethandler('member'); - return $handler->delete($this->mObject) ? USER_FRAME_VIEW_SUCCESS - : USER_FRAME_VIEW_ERROR; + return $handler->delete($group) ? USER_FRAME_VIEW_SUCCESS + : USER_FRAME_VIEW_ERROR; } function executeViewInput(&$controller, &$xoopsUser, &$render) { - $group =& new XoopsGroupEx($this->mObject); - $render->setTemplateName("group_delete.html"); $render->setAttribute('actionForm', $this->mActionForm); - $render->setAttribute('object', $group); + $render->setAttribute('object', $this->mObject); } function executeViewSuccess(&$controller, &$xoopsUser, &$render) @@ -48,7 +52,12 @@ function executeViewError(&$controller, &$xoopsUser, &$render) { - redirect_header("./index.php?action=GroupList", 1, _AD_USER_ERROR_DBUPDATE_FAILED); + $controller->executeRedirect("./index.php?action=GroupList", 1, _AD_USER_ERROR_DBUPDATE_FAILED); + } + + function executeViewCancel(&$controller, &$xoopsUser, &$render) + { + $controller->executeForward("./index.php?action=GroupList"); } }