From e38526581f94b3497a2828bd129e474e9503fca5 Mon Sep 17 00:00:00 2001 From: centaurix Date: Thu, 22 Feb 2001 18:03:18 +0000 Subject: [PATCH] added check if loading of the theme is successful. this is a cool hack using include instead of require. maybe we should write an include function that does all require stuff via that. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1153 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/load_prefs.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/load_prefs.php b/src/load_prefs.php index bfc2e6b3..6778427a 100644 --- a/src/load_prefs.php +++ b/src/load_prefs.php @@ -36,7 +36,7 @@ } if ((isset($chosen_theme)) && (file_exists($chosen_theme))) { - require("$chosen_theme"); + $loaded=@include("$chosen_theme"); } else { if (file_exists($theme[0]["PATH"])) { require($theme[0]["PATH"]); @@ -61,7 +61,7 @@ $color[11] = "#770000"; // (dark red) Special Folders color } } - + if (!isset($loaded)) echo "loading configured theme $chosen_theme failed"; if (!isset($download_php)) session_register("theme_css"); $use_javascript_addr_book = getPref($data_dir, $username, "use_javascript_addr_book"); -- 2.25.1