aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorAndré Noack <noack@data-quest.de>2025-01-03 09:39:24 +0000
committerAndré Noack <noack@data-quest.de>2025-01-03 09:39:24 +0000
commit102efecdcc465a18d5a79e5c2e7f4a2483bc5b9e (patch)
treef7e61424fc6973e6a9e6e40a0e3968a5f6532f25 /templates
parentc70749a61392eae042f40ce63de34b6359deb3f8 (diff)
Resolve #5029 "„Error: Fehlende Session.“ beim Aufruf einer falschen Trails URL"
Closes #5029 Merge request studip/studip!3800
Diffstat (limited to 'templates')
-rw-r--r--templates/header.php10
-rw-r--r--templates/login/_header_languages.php4
2 files changed, 7 insertions, 7 deletions
diff --git a/templates/header.php b/templates/header.php
index 64d1c3c..b4ced53 100644
--- a/templates/header.php
+++ b/templates/header.php
@@ -123,10 +123,10 @@ if ($navigation) {
&& Navigation::getItem('/profile')->isActive();
?>
-
+
<? if (is_object($GLOBALS['perm']) && PersonalNotifications::isActivated() && $GLOBALS['perm']->have_perm('autor')) : ?>
-
+
<? $notifications = PersonalNotifications::getMyNotifications() ?>
<? $lastvisit = (int)UserConfig::get($GLOBALS['user']->id)->getValue('NOTIFICATIONS_SEEN_LAST_DATE') ?>
<? foreach ($notifications as $notification) {
@@ -137,7 +137,7 @@ if ($navigation) {
<!-- User-Avatar -->
<li class="header_avatar_container <?= !empty($alert) ? 'alert' : '' ?> <? if ($active) echo 'active'; ?>" id="avatar-menu-container">
<div id="notification-container" <?= count($notifications) > 0 ? ' class="hoverable"' : '' ?>>
-
+
<button id="notification_marker" data-toggles="#notification_checkbox" <?= !empty($alert) ? ' class="alert"' : "" ?>
title="<?= sprintf(
ngettext('%u Benachrichtigung', '%u Benachrichtigungen', count($notifications)),
@@ -212,7 +212,7 @@ if ($navigation) {
<? else: ?>
<li>
<form method="post" action="<?= URLHelper::getLink(Request::url(), ['cancel_login' => null]) ?>">
- <?= CSRFProtection::tokenTag() ?>
+ <? try {echo CSRFProtection::tokenTag();} catch (SessionRequiredException){}?>
<input type="hidden" name="user_config_submitted" value="1">
<div id="contrast">
<? if (!empty($_SESSION['contrast'])): ?>
@@ -222,7 +222,7 @@ if ($navigation) {
<? else: ?>
<?= Icon::create('accessibility', Icon::ROLE_INFO_ALT)->asImg(24) ?>
<button class="as-link" name="set_contrast"><?= _('Hohen Kontrast aktivieren') ?></button>
- <?= tooltipIcon(_('Aktiviert einen hohen Kontrast gemäß WCAG 2.1. Diese Einstellung wird nach dem Login übernommen.
+ <?= tooltipIcon(_('Aktiviert einen hohen Kontrast gemäß WCAG 2.1. Diese Einstellung wird nach dem Login übernommen.
Sie können sie in Ihren persönlichen Einstellungen ändern.'), false, false, true); ?>
<? endif ?>
</div>
diff --git a/templates/login/_header_languages.php b/templates/login/_header_languages.php
index def8d32..db8f41a 100644
--- a/templates/login/_header_languages.php
+++ b/templates/login/_header_languages.php
@@ -1,5 +1,5 @@
<form id="language-selector" method="POST" action="<?= URLHelper::getLink(Request::url(), ['cancel_login' => null]) ?>">
- <?= CSRFProtection::tokenTag() ?>
+ <? try {echo CSRFProtection::tokenTag();} catch (SessionRequiredException){}?>
<input type="hidden" name="user_config_submitted" value="1">
<select id="languages" name="set_language" class="select2" onchange="this.form.submit()">
<? foreach ($GLOBALS['INSTALLED_LANGUAGES'] as $temp_language_key => $temp_language): ?>
@@ -32,4 +32,4 @@
templateSelection: format
});
});
-</script> \ No newline at end of file
+</script>