From 64dec52560c0b3f64b65a99dfd46c773644eea8c Mon Sep 17 00:00:00 2001 From: jmunro Date: Mon, 7 Oct 2002 00:58:18 +0000 Subject: [PATCH] add themes support to plugins using SM_PATH git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3784 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- include/load_prefs.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/load_prefs.php b/include/load_prefs.php index e96d042b..c18cae31 100644 --- a/include/load_prefs.php +++ b/include/load_prefs.php @@ -27,6 +27,10 @@ $color = ( !isset($color) ? array() : $color ); $chosen_theme = getPref($data_dir, $username, 'chosen_theme'); $found_theme = false; + +/* need to adjust $chosen_theme path with SM_PATH */ +$chosen_theme = preg_replace("/(\.\.\/){1,}/", SM_PATH, $chosen_theme); + for ($i = 0; $i < count($theme); ++$i){ if ($theme[$i]['PATH'] == $chosen_theme) { $found_theme = true; @@ -63,6 +67,8 @@ if (isset($chosen_theme) && $found_theme && (file_exists($chosen_theme))) { } } +sqsession_register($color, 'color'); + if (!defined('download_php')) { session_register('theme_css'); } -- 2.25.1