When deleting a comment, add to display 'deleted' message.

This commit is contained in:
BJRambo 2016-05-23 05:05:51 +09:00
parent fc8025759c
commit 228eb1f6c9
5 changed files with 95 additions and 5 deletions

View file

@ -510,10 +510,19 @@ class boardController extends board
// generate comment controller object
$oCommentController = getController('comment');
$output = $oCommentController->deleteComment($comment_srl, $this->grant->manager);
if(!$output->toBool())
if($this->module_info->comment_delete_message === 'Y')
{
return $output;
$comment->content = '';
$comment->status = 7;
$output = $oCommentController->updateCommentByDelete($comment, $this->grant->manager);
}
else
{
$output = $oCommentController->deleteComment($comment_srl, $this->grant->manager);
if(!$output->toBool())
{
return $output;
}
}
$this->add('mid', Context::get('mid'));