Skip to content

Commit 559aece

Browse files
authored
Fix prefixes not getting set correctly (hestiacp#3171)
* Fix prefixes not getting set correctly * Fix weird CSS issue
1 parent 34bd8d6 commit 559aece

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

web/inc/main.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,20 +175,21 @@ function render_page($user, $TAB, $page) {
175175
$__template_dir = dirname(__DIR__) . "/templates/";
176176
$__pages_js_dir = dirname(__DIR__) . "/js/pages/";
177177

178+
// Extract global variables
179+
// I think those variables should be passed via arguments
180+
extract($GLOBALS, EXTR_SKIP);
181+
178182
// Header
179183
include $__template_dir . "header.php";
180184

185+
// Panel
186+
$panel = top_panel(empty($_SESSION["look"]) ? $_SESSION["user"] : $_SESSION["look"], $TAB);
187+
181188
// Including page specific js file
182189
if (file_exists($__pages_js_dir . $page . ".js")) {
183190
echo '<script defer src="/js/pages/' . $page . ".js?" . JS_LATEST_UPDATE . '"></script>';
184191
}
185192

186-
// Panel
187-
$panel = top_panel(empty($_SESSION["look"]) ? $_SESSION["user"] : $_SESSION["look"], $TAB);
188-
// Extract global variables
189-
// I think those variables should be passed via arguments
190-
extract($GLOBALS, EXTR_SKIP);
191-
192193
// Policies controller
193194
@include_once dirname(__DIR__) . "/inc/policies.php";
194195

0 commit comments

Comments
 (0)