aboutsummaryrefslogtreecommitdiff
path: root/lib/classes/PageLayout.php
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2024-05-28 07:55:24 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2024-05-28 07:55:24 +0000
commitfe2b584cb79ba8a2c642be085cacdd82d526df25 (patch)
tree875665187b3f3c9e26bc0056bf9d658c8b724d29 /lib/classes/PageLayout.php
parent4e798558115a71c61d9a5f77a909356aeb0873b6 (diff)
add debug bar, fixes #4220
Closes #4220 Merge request studip/studip!3049
Diffstat (limited to 'lib/classes/PageLayout.php')
-rw-r--r--lib/classes/PageLayout.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/classes/PageLayout.php b/lib/classes/PageLayout.php
index d3f3028..a4178a5 100644
--- a/lib/classes/PageLayout.php
+++ b/lib/classes/PageLayout.php
@@ -139,6 +139,21 @@ class PageLayout
self::addScript('studip-wysiwyg.js?v=' . $v);
self::addStylesheet('print.css?v=' . $v, ['media' => 'print']);
+
+ if (Studip\Debug\DebugBar::isActivated()) {
+ $old_base = URLHelper::setBaseURL($GLOBALS['ABSOLUTE_URI_STUDIP']);
+
+ self::addHeadElement('link', [
+ 'href' => URLHelper::getURL('dispatch.php/debugbar/css'),
+ 'rel' => 'stylesheet',
+ 'type' => 'text/css',
+ ]);
+ self::addHeadElement('script', [
+ 'src' => URLHelper::getURL('dispatch.php/debugbar/js'),
+ ]);
+
+ URLHelper::setBaseURL($old_base);
+ }
}
/**