From 0cf59159cd8e92e3699615e1bbe64071b3a5fa79 Mon Sep 17 00:00:00 2001 From: FreddleSpl0it Date: Mon, 26 Dec 2022 12:03:51 +0100 Subject: [PATCH] [Web] fix SAL display --- data/web/admin.php | 4 ---- data/web/debug.php | 6 ++++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/data/web/admin.php b/data/web/admin.php index e53d18fd..a3b908b7 100644 --- a/data/web/admin.php +++ b/data/web/admin.php @@ -10,9 +10,6 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/header.inc.php'; $_SESSION['return_to'] = $_SERVER['REQUEST_URI']; $tfa_data = get_tfa(); $fido2_data = fido2(array("action" => "get_friendly_names")); -if (!isset($_SESSION['gal']) && $license_cache = $redis->Get('LICENSE_STATUS_CACHE')) { - $_SESSION['gal'] = json_decode($license_cache, true); -} $js_minifier->add('/web/js/site/admin.js'); $js_minifier->add('/web/js/presets/rspamd.js'); @@ -89,7 +86,6 @@ $template_data = [ 'tfa_id' => @$_SESSION['tfa_id'], 'fido2_cid' => @$_SESSION['fido2_cid'], 'fido2_data' => $fido2_data, - 'gal' => @$_SESSION['gal'], 'api' => [ 'ro' => admin_api('ro', 'get'), 'rw' => admin_api('rw', 'get'), diff --git a/data/web/debug.php b/data/web/debug.php index 5618ec00..45c4456c 100644 --- a/data/web/debug.php +++ b/data/web/debug.php @@ -11,6 +11,11 @@ $_SESSION['return_to'] = $_SERVER['REQUEST_URI']; $solr_status = (preg_match("/^([yY][eE][sS]|[yY])+$/", $_ENV["SKIP_SOLR"])) ? false : solr_status(); $clamd_status = (preg_match("/^([yY][eE][sS]|[yY])+$/", $_ENV["SKIP_CLAMD"])) ? false : true; + +if (!isset($_SESSION['gal']) && $license_cache = $redis->Get('LICENSE_STATUS_CACHE')) { + $_SESSION['gal'] = json_decode($license_cache, true); +} + $js_minifier->add('/web/js/site/debug.js'); // vmail df @@ -54,6 +59,7 @@ $template_data = [ 'vmail_df' => $vmail_df, 'hostname' => $hostname, 'timezone' => $timezone, + 'gal' => @$_SESSION['gal'], 'license_guid' => license('guid'), 'solr_status' => $solr_status, 'solr_uptime' => round($solr_status['status']['dovecot-fts']['uptime'] / 1000 / 60 / 60),