Minahito
minah****@users*****
2006年 1月 19日 (木) 21:12:51 JST
Index: xoops2jp/html/modules/user/class/AbstractDeleteAction.class.php diff -u xoops2jp/html/modules/user/class/AbstractDeleteAction.class.php:1.1.2.2 xoops2jp/html/modules/user/class/AbstractDeleteAction.class.php:1.1.2.3 --- xoops2jp/html/modules/user/class/AbstractDeleteAction.class.php:1.1.2.2 Sun Dec 25 00:04:55 2005 +++ xoops2jp/html/modules/user/class/AbstractDeleteAction.class.php Thu Jan 19 21:12:51 2006 @@ -1,58 +1,18 @@ <?php -class User_AbstractDeleteAction extends UserAction -{ - var $mObject=null; - var $mHandler=null; - - function isSecure() - { - return true; - } - - function getDefaultView(&$controller,&$xoopsUser) - { - $this->_proccessObject($controller); - - if($this->mObject == null) { - return USER_FRAME_VIEW_ERROR; - } - - return USER_FRAME_VIEW_INPUT; - } - - function execute(&$controller,&$xoopsUser) - { - $this->_proccessObject($controller); +require_once XOOPS_MODULE_PATH . "/sample/class/AbstractEditAction.class.php"; - if ($this->mObject == null) { - return USER_FRAME_VIEW_ERROR; - } - - $handler =& $this->getDeleteHandler(); - return $handler->delete($this->mObject) ? USER_FRAME_VIEW_SUCCESS : USER_FRAME_VIEW_ERROR; - } - - function _proccessObject(&$controller) - { - $id = $this->getId(); - $this->mHandler =& $this->getHandler(); - $this->mObject =& $this->mHandler->get($id); - } - - function &getHandler($controller) - { - } - - function &getDeleteHandler($controller) +class User_AbstractDeleteAction extends User_AbstractEditAction +{ + function isEnableCreate() { - $handler =& $this->getHandler($controller); - return $handler; + return false; } - function getId() + function _doExecute() { + return $this->mObjectHandler->delete($this->mObject); } } -?> \ No newline at end of file +?> Index: xoops2jp/html/modules/user/class/AbstractEditAction.class.php diff -u xoops2jp/html/modules/user/class/AbstractEditAction.class.php:1.1.2.2 xoops2jp/html/modules/user/class/AbstractEditAction.class.php:1.1.2.3 --- xoops2jp/html/modules/user/class/AbstractEditAction.class.php:1.1.2.2 Tue Jan 17 19:36:08 2006 +++ xoops2jp/html/modules/user/class/AbstractEditAction.class.php Thu Jan 19 21:12:51 2006 @@ -25,7 +25,7 @@ $this->mObjectHandler = $this->_getHandler(); $this->mObject =& $this->mObjectHandler->get($id); - + if ($this->mObject == null && $this->isEnableCreate()) { $this->mObject =& $this->mObjectHandler->create(); } @@ -49,7 +49,7 @@ } $this->mActionForm->load($this->mObject); - + return USER_FRAME_VIEW_INPUT; }