#581 댓글관리 '휴지통' 이동 추가

This commit is contained in:
akasima 2014-03-18 21:46:42 +09:00
parent c05bceccf2
commit 2e96c67571
3 changed files with 38 additions and 0 deletions

View file

@ -340,6 +340,35 @@ class commentAdminController extends comment
}
}
/**
* @fn procCommentAdminMoveToTrash
* @brief move a comment to trash
* @see commentModel::getCommentMenu
*/
function procCommentAdminMoveToTrash()
{
$oDB = DB::getInstance();
$oDB->begin();
$comment_srl = Context::get('comment_srl');
$oCommentModel = getModel('comment');
$oCommentController = getController('comment');
$oComment = $oCommentModel->getComment($comment_srl, false);
if(!$oComment->isGranted()) return $this->stop('msg_not_permitted');
$message_content = "";
$this->_moveCommentToTrash(array($comment_srl), $oCommentController, $oDB, $message_content);
$isTrash = true;
$output = $oCommentController->deleteComment($comment_srl, TRUE, $isTrash);
$oDB->commit();
$returnUrl = Context::get('cur_url');
$this->add('redirect_url', $returnUrl);
}
/**
* Cancel the blacklist of abused comments reported by other users
* @return void|object