Skip to content

Commit

Permalink
Fix prefixes not getting set correctly (#3171)
Browse files Browse the repository at this point in the history
* Fix prefixes not getting set correctly

* Fix weird CSS issue
  • Loading branch information
jakobbouchard committed Dec 27, 2022
1 parent 34bd8d6 commit 559aece
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions web/inc/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,20 +175,21 @@ function render_page($user, $TAB, $page) {
$__template_dir = dirname(__DIR__) . "/templates/";
$__pages_js_dir = dirname(__DIR__) . "/js/pages/";

// Extract global variables
// I think those variables should be passed via arguments
extract($GLOBALS, EXTR_SKIP);

// Header
include $__template_dir . "header.php";

// Panel
$panel = top_panel(empty($_SESSION["look"]) ? $_SESSION["user"] : $_SESSION["look"], $TAB);

// Including page specific js file
if (file_exists($__pages_js_dir . $page . ".js")) {
echo '<script defer src="/js/pages/' . $page . ".js?" . JS_LATEST_UPDATE . '"></script>';
}

// Panel
$panel = top_panel(empty($_SESSION["look"]) ? $_SESSION["user"] : $_SESSION["look"], $TAB);
// Extract global variables
// I think those variables should be passed via arguments
extract($GLOBALS, EXTR_SKIP);

// Policies controller
@include_once dirname(__DIR__) . "/inc/policies.php";

Expand Down

0 comments on commit 559aece

Please sign in to comment.