[xoops-cvslog 3568] CVS update: xoops2jp/html/modules/user/admin/actions

Back to archive index

Minahito minah****@users*****
2006年 7月 13日 (木) 19:46:13 JST


Index: xoops2jp/html/modules/user/admin/actions/UserDeleteAction.class.php
diff -u xoops2jp/html/modules/user/admin/actions/UserDeleteAction.class.php:1.1.2.2 xoops2jp/html/modules/user/admin/actions/UserDeleteAction.class.php:1.1.2.3
--- xoops2jp/html/modules/user/admin/actions/UserDeleteAction.class.php:1.1.2.2	Tue Mar 28 22:31:14 2006
+++ xoops2jp/html/modules/user/admin/actions/UserDeleteAction.class.php	Thu Jul 13 19:46:13 2006
@@ -1,4 +1,8 @@
 <?php
+/**
+ * @package user
+ * @version $Id: UserDeleteAction.class.php,v 1.1.2.3 2006/07/13 10:46:13 minahito Exp $
+ */
 
 if (!defined('XOOPS_ROOT_PATH')) exit();
 
@@ -9,7 +13,7 @@
 {
 	function _getId()
 	{
-		return isset($_REQUEST['uid']) ? $_REQUEST['uid'] : 0;
+		return xoops_getrequest('uid');
 	}
 
 	function &_getHandler()
@@ -20,10 +24,21 @@
 
 	function _setupActionForm()
 	{
-		$this->mActionForm =& new UserAdminDeleteForm();
+		$this->mActionForm =& new User_UserAdminDeleteForm();
 		$this->mActionForm->prepare();
 	}
 	
+	function _setupObject()
+	{
+		//
+		// It is not possible to delete the super administrator.
+		//
+		parent::_setupObject();
+		if (is_object($this->mObject) && $this->mObject->get('uid') == 1) {
+			$this->mObject = null;
+		}
+	}
+
 	function _doExecute()
 	{
 		$handler =& xoops_gethandler('member');
@@ -45,7 +60,12 @@
 
 	function executeViewError(&$controller, &$xoopsUser, &$render)
 	{
-		redirect_header("./index.php?action=UserList", 1, _AD_USER_ERROR_DBUPDATE_FAILED);
+		$controller->executeRedirect("./index.php?action=UserList", 1, _AD_USER_ERROR_DBUPDATE_FAILED);
+	}
+	
+	function executeViewCancel(&$controller, &$xoopsUser, &$render)
+	{
+		$controller->executeForward("./index.php?action=UserList");
 	}
 }
 


xoops-cvslog メーリングリストの案内
Back to archive index