fix magnet comment access

This commit is contained in:
ghost 2023-09-05 21:40:43 +03:00
parent d1496747bf
commit 29146f73fe

View File

@ -369,7 +369,8 @@ echo '<?xml version="1.0" encoding="UTF-8"?>' . PHP_EOL ?>
<div class="padding-x-16 padding-t-16 padding-b-8 margin-t-8 border-radius-3 background-color-night <?php echo !$magnetComment->approved || !$magnetComment->public ? 'opacity-06 opacity-hover-1' : false ?>"> <div class="padding-x-16 padding-t-16 padding-b-8 margin-t-8 border-radius-3 background-color-night <?php echo !$magnetComment->approved || !$magnetComment->public ? 'opacity-06 opacity-hover-1' : false ?>">
<a name="comment-<?php echo $magnetComment->magnetCommentId ?>"></a> <a name="comment-<?php echo $magnetComment->magnetCommentId ?>"></a>
<?php if ($response->user->address == $db->getUser($magnetComment->userId)->address || <?php if ($response->user->address == $db->getUser($magnetComment->userId)->address ||
in_array($response->user->address, MODERATOR_IP_LIST)) { ?> in_array($response->user->address, MODERATOR_IP_LIST) ||
($magnetComment->approved && $magnetComment->public)) { ?>
<div class="margin-b-16"> <div class="margin-b-16">
<?php echo nl2br(htmlentities($magnetComment->value)) ?> <?php echo nl2br(htmlentities($magnetComment->value)) ?>
</div> </div>