aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2024-04-18 10:21:51 +0000
committerJan-Hendrik Willms <tleilax+github@gmail.com>2024-04-19 09:36:32 +0200
commit3a9afe9810400932dc409091d107f5fc8a909cb6 (patch)
tree790c0dcb1f284c045b9e98a52935c8416ce8ecf7 /templates
parentfb268198ec7a1f2e4d13f89af02b167a3ddb08a2 (diff)
don't rely on set data for determining whether a sidebar is present, check the...
Closes #3927 Merge request studip/studip!2883
Diffstat (limited to 'templates')
-rw-r--r--templates/header.php8
1 files changed, 1 insertions, 7 deletions
diff --git a/templates/header.php b/templates/header.php
index 73e3713..53d411e 100644
--- a/templates/header.php
+++ b/templates/header.php
@@ -66,18 +66,12 @@ if ($navigation) {
'username' => $user->username,
'perm' => $GLOBALS['perm']->get_perm()
];
-
- $navWidget = Sidebar::get()->countWidgets(NavigationWidget::class);
- $allWidgets = Sidebar::get()->countWidgets();
- $hasSidebar = $allWidgets - $navWidget > 0;
?>
<? } else {
$me = ['username' => 'nobody'];
- $hasSidebar = false;
} ?>
<responsive-navigation :me="<?= htmlReady(json_encode($me)) ?>"
- context="<?= htmlReady(Context::get() ? Context::get()->getFullname() : '') ?>"
- :has-sidebar="<?= $hasSidebar ? 'true' : 'false' ?>"
+ context="<?= htmlReady(Context::get() ? Context::get()->getFullName() : '') ?>"
:navigation="<?= htmlReady(json_encode(ResponsiveHelper::getNavigationObject($_COOKIE['responsive-navigation-hash'] ?? null))) ?>"
></responsive-navigation>
</div>