Skip to content
Snippets Groups Projects
Commit 4e9e4166 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

fixes #4127

Closes #4127

Merge request studip/studip!2970
parent 49451b26
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@
<? else : ?>
<? $num_postings = ForumVisit::getCount($entry['topic_id'], $visitdate) ?>
<?= Icon::create('forum', $num_postings > 0 ? Icon::ROLE_ATTENTION : Icon::ROLE_INFO)->asImg([
'title' => ForumHelpers::getVisitText($num_postings, $entry['topic_id'], $constraint['depth']),
'title' => ForumHelpers::getVisitText($num_postings, $entry['topic_id']),
]) ?>
<? endif ?>
</td>
......@@ -36,7 +36,7 @@
</td>
<td class="postings">
<?= number_format(max($entry['num_postings'] - 1, 0), 0, ',', '.') ?>
<?= number_format(max(($entry['num_postings'] ?? 0) - 1, 0), 0, ',', '.') ?>
</td>
<td class="answer hidden-tiny-down">
......
<? if (is_array($entry['last_posting']) && count($entry['last_posting'])) : ?>
<? if (!empty($entry['last_posting']) && is_array($entry['last_posting'])) : ?>
<?= _('von') ?>
<? if (!empty($entry['last_posting']['anonymous'])): ?>
<?= _('Anonym') ?>
......
......@@ -124,7 +124,7 @@ class ForumActivity
'mkdate' => $post['mkdate'] ?? time()
];
if ($post['anonymous']) {
if (!empty($post['anonymous'])) {
$data['actor_type'] = 'anonymous';
$data['actor_id'] = '';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment