mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
관리자가 게시글을 삭제 할 떄 자리 남김 옵션을 사용할 경우 해당 모듈의 옵션대로 자리 남기도록 개선
This commit is contained in:
parent
de629d6d43
commit
df42e43259
1 changed files with 33 additions and 6 deletions
|
|
@ -206,11 +206,8 @@ class commentAdminController extends comment
|
|||
$this->_sendMessageForComment($message_content, $comment_srl_list);
|
||||
}
|
||||
// for message send - end
|
||||
// comment into trash
|
||||
if($isTrash == 'true')
|
||||
{
|
||||
$this->_moveCommentToTrash($comment_srl_list, $oCommentController, $oDB, $message_content);
|
||||
}
|
||||
|
||||
|
||||
|
||||
$deleted_count = 0;
|
||||
// Delete the comment posting
|
||||
|
|
@ -222,7 +219,31 @@ class commentAdminController extends comment
|
|||
continue;
|
||||
}
|
||||
|
||||
$output = $oCommentController->deleteComment($comment_srl, TRUE, toBool($isTrash));
|
||||
$comment = CommentModel::getComment($comment_srl);
|
||||
$module_info = ModuleModel::getModuleInfoByModuleSrl($comment->get('module_srl'));
|
||||
|
||||
if($module_info->comment_delete_message === 'yes')
|
||||
{
|
||||
$output = $oCommentController->updateCommentByDelete($comment, true);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
if($isTrash == 'true')
|
||||
{
|
||||
$output = $oCommentController->moveCommentToTrash($comment, true);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
unset($comment_srl_list[$i]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$output = $oCommentController->deleteComment($comment_srl, TRUE, toBool($isTrash));
|
||||
}
|
||||
|
||||
if(!$output->toBool() && $output->error !== -2)
|
||||
{
|
||||
$oDB->rollback();
|
||||
|
|
@ -231,6 +252,12 @@ class commentAdminController extends comment
|
|||
$deleted_count++;
|
||||
}
|
||||
|
||||
// comment into trash
|
||||
if($isTrash == 'true')
|
||||
{
|
||||
$this->_moveCommentToTrash($comment_srl_list, $oCommentController, $oDB, $message_content);
|
||||
}
|
||||
|
||||
$oDB->commit();
|
||||
|
||||
$msgCode = '';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue