aboutsummaryrefslogtreecommitdiff
path: root/lib/classes/ModulesNotification.class.php
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2024-04-09 14:44:19 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2024-04-09 14:44:19 +0000
commit086864d456cb0e1bab8d3394ca9aa3b8b9eddaed (patch)
treee3a67bda70fb02fcf5f81a217506f6f2d711e5bc /lib/classes/ModulesNotification.class.php
parent5d2d193451ebe0404f637edf0b23a9860bc07721 (diff)
fixes #3978
Closes #3978 Merge request studip/studip!2828
Diffstat (limited to 'lib/classes/ModulesNotification.class.php')
-rw-r--r--lib/classes/ModulesNotification.class.php19
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/classes/ModulesNotification.class.php b/lib/classes/ModulesNotification.class.php
index 3ee6642..f414071 100644
--- a/lib/classes/ModulesNotification.class.php
+++ b/lib/classes/ModulesNotification.class.php
@@ -126,7 +126,8 @@ class ModulesNotification
$navigation = MyRealmModel::getAdditionalNavigations($seminar_id, $s_data, null, $user_id, $visit_data[$seminar_id]);
$n_data = [];
foreach ($this->registered_notification_modules as $id => $m_data) {
- if (in_array($id, $s_data['notification'])
+ if (
+ in_array($id, $s_data['notification'])
&& isset($navigation[$id])
&& $navigation[$id]->getImage()
&& $navigation[$id]->getImage()->getRole() === Icon::ROLE_ATTENTION
@@ -168,14 +169,14 @@ class ModulesNotification
$base_url = URLHelper::setBaseURL('');
URLHelper::setBaseURl($base_url);
if ($nav instanceof Navigation && $nav->isVisible(true)) {
- $url = 'seminar_main.php?again=yes&auswahl=' . $seminar_id . '&redirect_to=' . strtr($nav->getURL(), '?', '&');
- $icon = $nav->getImage();
- $text = $nav->getTitle();
- if (!$text) {
- $text = $this->registered_notification_modules[$id]['name'];
- }
- $text .= ' - ' . $nav->getLinkAttributes()['title'];
- return compact('text', 'url', 'icon', 'seminar_id');
+ $url = 'seminar_main.php?again=yes&auswahl=' . $seminar_id . '&redirect_to=' . strtr($nav->getURL(), '?', '&');
+ $icon = $nav->getImage();
+ $text = $nav->getTitle();
+ if (!$text) {
+ $text = $this->registered_notification_modules[$id]['name'];
}
+ $text .= ' - ' . $nav->getLinkAttributes()['title'];
+ return compact('text', 'url', 'icon', 'seminar_id');
+ }
}
}