대댓글에 대한 세부옵션을 추가

This commit is contained in:
BJRambo 2016-05-24 23:23:16 +09:00
parent a0699b2e33
commit 4bbbd6ee36
4 changed files with 36 additions and 12 deletions

View file

@ -510,12 +510,30 @@ class boardController extends board
// generate comment controller object
$oCommentController = getController('comment');
if($this->module_info->comment_delete_message === 'Y')
if($this->module_info->comment_delete_message === 'yes')
{
$comment->content = '';
$comment->status = 7;
$output = $oCommentController->updateCommentByDelete($comment, $this->grant->manager);
}
elseif($this->module_info->comment_delete_message === 'only_commnet')
{
$childs = $oCommentModel->getChildComments($comment_srl);
if(count($childs) > 0)
{
$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;
}
}
}
else
{
$output = $oCommentController->deleteComment($comment_srl, $this->grant->manager);