mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
#581 댓글관리 '휴지통' 이동 추가
This commit is contained in:
parent
c05bceccf2
commit
2e96c67571
3 changed files with 38 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue