Skip to content
Snippets Groups Projects
Commit 102efecd authored by André Noack's avatar André Noack
Browse files

Resolve #5029 "„Error: Fehlende Session.“ beim Aufruf einer falschen Trails URL"

Closes #5029

Merge request !3800
parent c70749a6
No related branches found
No related tags found
No related merge requests found
......@@ -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>
......
<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>
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