From ae148db5acfbbab8cb161ffb1d27dd24a5c75813 Mon Sep 17 00:00:00 2001 From: IgorA100 Date: Sun, 1 Mar 2026 22:36:28 +0300 Subject: [PATCH] Chore: Optimized saving of "navbar_type" in session and cookies (index.php) --- web/index.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/web/index.php b/web/index.php index 9bc6ef3ba..5b961c171 100644 --- a/web/index.php +++ b/web/index.php @@ -178,14 +178,9 @@ if ( zm_setcookie('zmCSS', $css); } -if ( - !isset($_SESSION['navbar_type']) || - isset($_REQUEST['navbar_type']) || - !isset($_COOKIE['zmNavbar_type']) || - ($_COOKIE['zmNavbar_type'] != $navbar_type) -) { - $_SESSION['navbar_type'] = $navbar_type; - zm_setcookie('zmNavbar_type', $navbar_type); +if (!defined('ZM_FORCE_NAVBAR_TYPE')) { + if($_COOKIE['zmNavbar_type'] != $navbar_type) zm_setcookie('zmNavbar_type', $navbar_type); + if($_SESSION['navbar_type'] != $navbar_type) $_SESSION['navbar_type'] = $navbar_type; } # Add Cross domain access headers