mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
Allow admin to delete comment placeholders from list #967
This commit is contained in:
parent
5c858806b2
commit
7c30af23c5
1 changed files with 3 additions and 2 deletions
|
|
@ -237,7 +237,8 @@ class CommentAdminController extends Comment
|
||||||
$module_infos[$module_srl] = ModuleModel::getModuleInfoByModuleSrl($module_srl)->comment_delete_message ?? '';
|
$module_infos[$module_srl] = ModuleModel::getModuleInfoByModuleSrl($module_srl)->comment_delete_message ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if($module_infos[$module_srl] === 'yes')
|
$policy = $module_infos[$module_srl];
|
||||||
|
if ($policy === 'yes' && !in_array($comment->get('status'), [\RX_STATUS_DELETED, \RX_STATUS_DELETED_BY_ADMIN]))
|
||||||
{
|
{
|
||||||
$output = $oCommentController->updateCommentByDelete($comment, true);
|
$output = $oCommentController->updateCommentByDelete($comment, true);
|
||||||
if(!$output->toBool() && $output->error !== -2)
|
if(!$output->toBool() && $output->error !== -2)
|
||||||
|
|
@ -246,7 +247,7 @@ class CommentAdminController extends Comment
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif(starts_with('only_comm', $module_infos[$module_srl]))
|
elseif (starts_with('only_comm', $policy) && !in_array($comment->get('status'), [\RX_STATUS_DELETED, \RX_STATUS_DELETED_BY_ADMIN]))
|
||||||
{
|
{
|
||||||
$childs = CommentModel::getChildComments($comment_srl);
|
$childs = CommentModel::getChildComments($comment_srl);
|
||||||
if(count($childs) > 0)
|
if(count($childs) > 0)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue