From 3e725681410ab9c881d554f2f5d8db72736a08d5 Mon Sep 17 00:00:00 2001 From: Yasen Pramatarov Date: Thu, 26 Jun 2025 14:48:51 +0300 Subject: [PATCH] Fixes theme helper --- app/helpers/theme.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/helpers/theme.php b/app/helpers/theme.php index 126677d..a979f90 100644 --- a/app/helpers/theme.php +++ b/app/helpers/theme.php @@ -138,11 +138,14 @@ class Theme // Update session if (Session::isValidSession()) { - $_SESSION['user_theme'] = $themeName; + $_SESSION['theme'] = $themeName; } else { return false; } + // Clear the current theme cache + self::$currentTheme = null; + // Update config file $configFile = __DIR__ . '/../config/theme.php'; if (file_exists($configFile) && is_writable($configFile)) { @@ -162,8 +165,8 @@ class Theme self::$currentTheme = $themeName; return true; } + return false; - return true; }