mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41: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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$output = $oCommentController->deleteComment($comment_srl, TRUE, toBool($isTrash));
|
$comment = CommentModel::getComment($comment_srl);
|
||||||
if(!$output->toBool() && $output->error !== -2)
|
$module_info = ModuleModel::getModuleInfoByModuleSrl($comment->get('module_srl'));
|
||||||
|
|
||||||
|
if($module_info->comment_delete_message === 'yes')
|
||||||
{
|
{
|
||||||
$oDB->rollback();
|
$output = $oCommentController->updateCommentByDelete($comment, true);
|
||||||
return $output;
|
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++;
|
$deleted_count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$oDB->commit();
|
$oDB->commit();
|
||||||
|
|
||||||
$msgCode = '';
|
$msgCode = '';
|
||||||
|
|
|
||||||
|
|
@ -931,8 +931,7 @@ class commentController extends comment
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the case manager to delete comments, it indicated that the administrator deleted.
|
// 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 !== $this->user->member_srl)
|
||||||
if($is_admin === true && $obj->member_srl !== $logged_info->member_srl)
|
|
||||||
{
|
{
|
||||||
$obj->content = lang('msg_admin_deleted_comment');
|
$obj->content = lang('msg_admin_deleted_comment');
|
||||||
$obj->status = RX_STATUS_DELETED_BY_ADMIN;
|
$obj->status = RX_STATUS_DELETED_BY_ADMIN;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue