mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
Fix #1928 댓글 자리 남김 + 삭제시 휴지통 이동 기능 동시 사용시 댓글 내용이 유실되는 문제 수정
This commit is contained in:
parent
1f9056fc08
commit
ec51b64e78
1 changed files with 4 additions and 13 deletions
|
|
@ -911,7 +911,9 @@ class commentController extends comment
|
||||||
{
|
{
|
||||||
return new BaseObject(-1, 'msg_invalid_request');
|
return new BaseObject(-1, 'msg_invalid_request');
|
||||||
}
|
}
|
||||||
$comment = getModel('comment')->getComment($obj->comment_srl);
|
|
||||||
|
// check if comment exists and permission is granted
|
||||||
|
$comment = CommentModel::getComment($obj->comment_srl);
|
||||||
if(!$comment->isExists())
|
if(!$comment->isExists())
|
||||||
{
|
{
|
||||||
return new BaseObject(-1, 'msg_not_founded');
|
return new BaseObject(-1, 'msg_not_founded');
|
||||||
|
|
@ -928,17 +930,6 @@ class commentController extends comment
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if comment exists and permission is granted
|
|
||||||
$comment = CommentModel::getComment($obj->comment_srl);
|
|
||||||
if(!$comment->isExists())
|
|
||||||
{
|
|
||||||
return new BaseObject(-1, 'msg_not_founded');
|
|
||||||
}
|
|
||||||
if(!$is_admin && !$comment->isGranted())
|
|
||||||
{
|
|
||||||
return new BaseObject(-1, 'msg_not_permitted');
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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');
|
$logged_info = Context::get('logged_info');
|
||||||
if($is_admin === true && $obj->member_srl !== $logged_info->member_srl)
|
if($is_admin === true && $obj->member_srl !== $logged_info->member_srl)
|
||||||
|
|
@ -1197,7 +1188,7 @@ class commentController extends comment
|
||||||
function moveCommentToTrash($obj, $updateComment = false)
|
function moveCommentToTrash($obj, $updateComment = false)
|
||||||
{
|
{
|
||||||
// check if comment exists and permission is granted
|
// check if comment exists and permission is granted
|
||||||
$oComment = CommentModel::getComment($obj->comment_srl);
|
$oComment = ($obj instanceof commentItem) ? $obj : CommentModel::getComment($obj->comment_srl);
|
||||||
if(!$oComment->isExists())
|
if(!$oComment->isExists())
|
||||||
{
|
{
|
||||||
return new BaseObject(-1, 'msg_not_founded');
|
return new BaseObject(-1, 'msg_not_founded');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue