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

アーカイブの一覧に戻る

Minahito minah****@users*****
2005年 12月 22日 (木) 20:25:49 JST


Index: xoops2jp/html/modules/user/admin/actions/UserRankDeleteAction.class.php
diff -u xoops2jp/html/modules/user/admin/actions/UserRankDeleteAction.class.php:1.1.2.1 xoops2jp/html/modules/user/admin/actions/UserRankDeleteAction.class.php:1.1.2.2
--- xoops2jp/html/modules/user/admin/actions/UserRankDeleteAction.class.php:1.1.2.1	Mon Nov 21 20:01:01 2005
+++ xoops2jp/html/modules/user/admin/actions/UserRankDeleteAction.class.php	Thu Dec 22 20:25:49 2005
@@ -1,43 +1,29 @@
 <?php
 
-require_once XOOPS_ROOT_PATH."/modules/user/class/RankObject.class.php";
+require_once XOOPS_MODULE_PATH . "/user/class/RankObject.class.php";
+require_once XOOPS_MODULE_PATH . "/user/class/AbstractDeleteAction.class.php";
 
-class UserRankDeleteAction extends UserAction
+class UserRankDeleteAction extends User_AbstractDeleteAction
 {
-	var $mRank=null;
-	var $mRankHandler=null;
-
-	function isSecure()
+	function &getHandler()
 	{
-		return true;
-	}
+		$root =& XCube_Root::getSingleton();
+		$db =& $root->mController->getDB();
 
-	function getDefaultView(&$controller,&$xoopsUser)
-	{
-		$this->_proccessObject($controller);
-		if($this->mRank==null)
-			return USER_FRAME_VIEW_ERROR;
+		$handler =& new UserRankObjectHandler($db);
 
-		return USER_FRAME_VIEW_INPUT;
+		return $handler;
 	}
 	
-	function execute(&$controller,&$xoopsUser)
+	function getId()
 	{
-		$this->_proccessObject($controller);
-		if($this->mRank==null)
-			return USER_FRAME_VIEW_ERROR;
-
-		if($this->mRankHandler->delete($this->mRank))
-			return USER_FRAME_VIEW_SUCCESS;
-		else
-			return USER_FRAME_VIEW_ERROR;
+		return isset($_REQUEST['rank_id']) ? intval($_REQUEST['rank_id']) : 0;
 	}
 
-	function _proccessObject(&$controller)
+	function executeViewInput(&$controller,&$xoopsUser,&$renderSystem)
 	{
-		$rank_id=isset($_REQUEST['rank_id']) ? intval($_REQUEST['rank_id']) : 0;
-		$this->mRankHandler=new UserRankObjectHandler($controller->mDB);
-		$this->mRank=&$this->mRankHandler->get($rank_id);
+		$renderSystem->setTemplateName("user_admin_rankdelete_input.html");
+		$renderSystem->setAttribute("rank",$this->mObject);
 	}
 
 	function executeViewSuccess(&$controller,&$xoopsUser,&$renderSystem)
@@ -49,12 +35,6 @@
 	{
 		XCube_Utils::redirectHeader("?action=RankList",1,_MD_A_USER_ERROR_RAISE_ERROR);
 	}
-
-	function executeViewInput(&$controller,&$xoopsUser,&$renderSystem)
-	{
-		$renderSystem->setTemplateName("user_admin_rankdelete_input.html");
-		$renderSystem->setAttribute("rank",$this->mRank);
-	}
 }
 
 ?>
\ No newline at end of file


xoops-cvslog メーリングリストの案内
アーカイブの一覧に戻る