public function run($ids)
 {
     if ($this->record) {
         Wind::import('SRV:forum.srv.operation.PwDeleteReply');
         Wind::import('SRV:forum.srv.dataSource.PwFetchReplyByPid');
         $srv = new PwDeleteReply(new PwFetchReplyByPid($this->record), $this->srv->user);
         $srv->setIsDeleteFresh(false)->setIsDeductCredit($this->srv->isDeductCredit)->execute();
         //帖子回复产生的新鲜事删除,日志记录为“删除帖子”类型的日志
         Wekit::load('log.srv.PwLogService')->addThreadManageLog($this->srv->user, 'delete', $srv->data, '');
     }
 }
 public function run()
 {
     if ($this->pids) {
         Wind::import('SRV:forum.srv.operation.PwDeleteReply');
         Wind::import('SRV:forum.srv.dataSource.PwFetchReplyByPid');
         $service1 = new PwDeleteReply(new PwFetchReplyByPid($this->pids), $this->srv->user);
         $service1->setRecycle(true)->setIsDeductCredit($this->isDeductCredit)->setReason($this->_reason)->execute();
         //删除帖子回复
         Wekit::load('log.srv.PwLogService')->addThreadManageLog($this->srv->user, 'delete', $service1->data, $this->_reason, '', true);
     }
     if ($this->tids) {
         Wind::import('SRV:forum.srv.operation.PwDeleteTopic');
         Wind::import('SRV:forum.srv.dataSource.PwFetchTopicByTid');
         $service2 = new PwDeleteTopic(new PwFetchTopicByTid($this->tids), $this->srv->user);
         $service2->setRecycle(true)->setIsDeductCredit($this->isDeductCredit)->setReason($this->_reason)->execute();
         //删除帖子
         Wekit::load('log.srv.PwLogService')->addThreadManageLog($this->srv->user, 'delete', $service2->data, $this->_reason);
     }
 }
예제 #3
0
 /**
  * 删除回复
  */
 public function doDeleteReplyAction()
 {
     $pids = $this->getInput('pids');
     Wind::import('SRV:forum.srv.operation.PwDeleteReply');
     Wind::import('SRV:forum.srv.dataSource.PwFetchReplyByPid');
     $srv = new PwDeleteReply(new PwFetchReplyByPid($pids), $this->loginUser);
     $srv->execute();
     $this->showMessage('删除成功了');
 }
예제 #4
0
 public function doDeletePostAction()
 {
     $pid = $this->getInput('pid');
     if (empty($pid)) {
         $this->showError('operate.select');
     }
     !is_array($pid) && ($pid = array($pid));
     Wind::import('SRV:forum.srv.operation.PwDeleteReply');
     Wind::import('SRV:forum.srv.dataSource.PwFetchReplyByPid');
     $deleteReply = new PwDeleteReply(new PwFetchReplyByPid($pid), PwUserBo::getInstance($this->loginUser->uid));
     $deleteReply->setIsDeductCredit(1)->execute();
     $this->showMessage('success');
 }
예제 #5
0
 public function run($uid)
 {
     $operator = new PwDeleteReply(new PwFetchReplyByUid($uid), $this->operator);
     $operator->execute();
 }
예제 #6
0
 /**
  * Enter description here ...
  *
  */
 public function deletereplyAction()
 {
     list($pids, $isDeductCredit) = $this->getInput(array('pids', 'isDeductCredit'));
     if (!is_array($pids) || !count($pids)) {
         $this->showError('operate.select');
     }
     $service = new PwDeleteReply(new PwFetchReplyByPid($pids), new PwUserBo($this->loginUser->uid));
     $service->setRecycle(true)->setIsDeductCredit((bool) $isDeductCredit)->execute();
     $this->showMessage('operate.success');
 }
예제 #7
0
 public function doDeleteReplyAction()
 {
     $pids = $this->getInput('pids');
     if (!$pids) {
         $this->showError('operate.select');
     }
     Wind::import('SRV:forum.srv.operation.PwDeleteReply');
     Wind::import('SRV:forum.srv.dataSource.PwFetchReplyByPid');
     $srv = new PwDeleteReply(new PwFetchReplyByPid($pids), new PwUserBo($this->adminUser->getUid()));
     $srv->execute();
     $this->showMessage('删除成功了');
 }