Skip to content

Commit

Permalink
[FINNA-2722] Fix user check in comments list.
Browse files Browse the repository at this point in the history
  • Loading branch information
EreMaijala committed Oct 18, 2024
1 parent fc39ad0 commit 1fffe7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions themes/finna2/templates/record/comments-list.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
<?php
foreach ($comments as $comment):
$reported = $inappropriateComments && in_array($comment->getId(), $inappropriateComments);
$own = $user && $comment->getUser()->getId() === $user->getId();
$own = $user && $comment->getUser()?->getId() === $user->getId();
?>
<div class="comment-wrapper comment" data-id="<?=$comment->getId()?>">
<div class="name text-right">
<?php if ($ratingAllowed): ?>
<div class="comment-rating">
<?php $ratingData = $this->ratings()->getRatingData($this->driver, $comment->getUser()->getId()); ?>
<?php $ratingData = $this->ratings()->getRatingData($this->driver, $comment->getUser()?->getId()); ?>
<?php if ($ratingData['count']): ?>
<?=$this->render('Helpers/star-rating.phtml', ['readonly' => true, 'ratingData' => $ratingData]);?>
<?php endif; ?>
Expand Down

0 comments on commit 1fffe7d

Please sign in to comment.