Merge pull request #1802 from BOBODDO/develop

댓글 신고 불가 시 세션 값 변경 필요
This commit is contained in:
Kijin Sung 2021-10-19 20:38:27 +09:00 committed by GitHub
commit a1db2a5635
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1530,7 +1530,7 @@ class commentController extends comment
function declaredComment($comment_srl, $declare_message)
{
// Fail if session information already has a reported document
if($_SESSION['declared_comment'][$comment_srl])
if(isset($_SESSION['declared_comment'][$comment_srl]))
{
return new BaseObject(-1, 'failed_declared');
}
@ -1565,7 +1565,7 @@ class commentController extends comment
// failed if both ip addresses between author's and the current user are same.
if($oComment->get('ipaddress') == \RX_CLIENT_IP && !$this->user->isAdmin())
{
$_SESSION['declared_comment'][$comment_srl] = TRUE;
$_SESSION['declared_comment'][$comment_srl] = FALSE;
return new BaseObject(-1, 'failed_declared');
}
@ -1578,7 +1578,7 @@ class commentController extends comment
// session registered if the author information matches to the current logged-in user's.
if($member_srl && $member_srl == abs($oComment->get('member_srl')))
{
$_SESSION['declared_comment'][$comment_srl] = TRUE;
$_SESSION['declared_comment'][$comment_srl] = FALSE;
return new BaseObject(-1, 'failed_declared');
}
}
@ -1597,7 +1597,7 @@ class commentController extends comment
$log_output = executeQuery('comment.getCommentDeclaredLogInfo', $args);
if($log_output->data->count)
{
$_SESSION['declared_comment'][$comment_srl] = TRUE;
$_SESSION['declared_comment'][$comment_srl] = FALSE;
return new BaseObject(-1, 'failed_declared');
}