Minahito
minah****@users*****
2006年 7月 4日 (火) 18:47:30 JST
Index: xoops2jp/html/modules/pm/actions/PmDeleteAction.class.php diff -u xoops2jp/html/modules/pm/actions/PmDeleteAction.class.php:1.1.2.3 xoops2jp/html/modules/pm/actions/PmDeleteAction.class.php:removed --- xoops2jp/html/modules/pm/actions/PmDeleteAction.class.php:1.1.2.3 Tue Mar 28 22:30:49 2006 +++ xoops2jp/html/modules/pm/actions/PmDeleteAction.class.php Tue Jul 4 18:47:30 2006 @@ -1,71 +0,0 @@ -<?php - -if (!defined('XOOPS_ROOT_PATH')) exit(); - -require_once XOOPS_MODULE_PATH."/pm/forms/DeletePmsgForm.class.php"; - -class PmDeleteAction extends PmAction -{ - var $mActionForm=null; - - function isSecure() - { - return true; - } - - function getDefaultView(&$controller,&$xoopsUser) - { - return PM_FRAME_VIEW_ERROR; - } - - function execute(&$controller,&$xoopsUser) - { - $this->_processActionForm(); - - // - // Fetch request and validate. - // - $this->mActionForm->fetch(); - $this->mActionForm->validate(); - - // - // If error, go to re-input. - // - if($this->mActionForm->hasError()) - return PM_FRAME_VIEW_ERROR; - - // - // Delete PM - // - $pmHandler=&xoops_gethandler('privmessage'); - foreach($this->mActionForm->getVar('msg_id') as $msg_id) { - $pm=&$pmHandler->get($msg_id); - if(is_object($pm)&&($pm->getVar('to_userid')==$xoopsUser->getVar('uid'))) - $pmHandler->delete($pm); - unset($pm); - } - - return PM_FRAME_VIEW_SUCCESS; - } - - function _processActionForm() - { - // - // Create action form object by reply mode? or not? - // - $this->mActionForm=new DeletePmsgForm(); - $this->mActionForm->prepare(); - } - - function executeViewSuccess(&$controller,&$xoopsUser,&$renderSystem) - { - XCube_Utils::redirectHeader("./index.php",1,_PM_DELETED); - } - - function executeViewError(&$controller,&$xoopsUser,&$renderSystem) - { - XCube_Utils::redirectHeader("./index.php",1,_MD_PM_ERROR_ACCESS); - } -} - -?> \ No newline at end of file