댓글 삭제할때에도 휴지통 사용여부에 따라 휴지통으로 이동할 수 있도록 기능 추가

This commit is contained in:
BJRambo 2017-03-06 11:38:47 +09:00
parent 46055ffa66
commit b040372133
3 changed files with 117 additions and 6 deletions

View file

@ -530,6 +530,10 @@ class boardController extends board
if($this->module_info->comment_delete_message === 'yes' && $instant_delete != 'Y')
{
$output = $oCommentController->updateCommentByDelete($comment, $this->grant->manager);
if($this->module_info->trash_use == 'Y')
{
$output = $oCommentController->moveCommentToTrash($comment);
}
}
elseif(starts_with('only_comm', $this->module_info->comment_delete_message) && $instant_delete != 'Y')
{
@ -537,22 +541,40 @@ class boardController extends board
if(count($childs) > 0)
{
$output = $oCommentController->updateCommentByDelete($comment, $this->grant->manager);
if($this->module_info->trash_use == 'Y')
{
$output = $oCommentController->moveCommentToTrash($comment);
}
}
else
{
$output = $oCommentController->deleteComment($comment_srl, $this->grant->manager, FALSE, $childs);
if(!$output->toBool())
if($this->module_info->trash_use == 'Y')
{
return $output;
$output = $oCommentController->moveCommentToTrash($comment);
}
else
{
$output = $oCommentController->deleteComment($comment_srl, $this->grant->manager, FALSE, $childs);
if(!$output->toBool())
{
return $output;
}
}
}
}
else
{
$output = $oCommentController->deleteComment($comment_srl, $this->grant->manager);
if(!$output->toBool())
if($this->module_info->trash_use == 'Y')
{
return $output;
$output = $oCommentController->moveCommentToTrash($comment);
}
else
{
$output = $oCommentController->deleteComment($comment_srl, $this->grant->manager);
if(!$output->toBool())
{
return $output;
}
}
}