mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
Merge #1973 bjrambo:pr/delete-comment-log into develop
This commit is contained in:
commit
07cfb9f92e
2 changed files with 36 additions and 7 deletions
|
|
@ -222,15 +222,45 @@ class commentAdminController extends comment
|
|||
continue;
|
||||
}
|
||||
|
||||
$output = $oCommentController->deleteComment($comment_srl, TRUE, toBool($isTrash));
|
||||
if(!$output->toBool() && $output->error !== -2)
|
||||
$comment = CommentModel::getComment($comment_srl);
|
||||
$module_info = ModuleModel::getModuleInfoByModuleSrl($comment->get('module_srl'));
|
||||
|
||||
if($module_info->comment_delete_message === 'yes')
|
||||
{
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
$output = $oCommentController->updateCommentByDelete($comment, true);
|
||||
if(!$output->toBool() && $output->error !== -2)
|
||||
{
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
elseif(starts_with('only_comm', $module_info->comment_delete_message))
|
||||
{
|
||||
$childs = CommentModel::getChildComments($comment_srl);
|
||||
|
||||
if(count($childs) > 0)
|
||||
{
|
||||
$output = $oCommentController->updateCommentByDelete($comment, true);
|
||||
if(!$output->toBool() && $output->error !== -2)
|
||||
{
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$output = $oCommentController->deleteComment($comment_srl, TRUE, toBool($isTrash));
|
||||
if(!$output->toBool() && $output->error !== -2)
|
||||
{
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
$deleted_count++;
|
||||
}
|
||||
|
||||
|
||||
$oDB->commit();
|
||||
|
||||
$msgCode = '';
|
||||
|
|
|
|||
|
|
@ -931,8 +931,7 @@ class commentController extends comment
|
|||
}
|
||||
|
||||
// If the case manager to delete comments, it indicated that the administrator deleted.
|
||||
$logged_info = Context::get('logged_info');
|
||||
if($is_admin === true && $obj->member_srl !== $logged_info->member_srl)
|
||||
if($is_admin === true && $obj->member_srl !== $this->user->member_srl)
|
||||
{
|
||||
$obj->content = lang('msg_admin_deleted_comment');
|
||||
$obj->status = RX_STATUS_DELETED_BY_ADMIN;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue