From 04a87fc9ddc74e3a94c6ceac0d6c0365c70c631e Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Sun, 27 Jan 2013 01:35:23 +0100 Subject: [PATCH] 0002032: user_theme() should return default if theme does not exist --- includes/prefs/userprefs.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/prefs/userprefs.inc b/includes/prefs/userprefs.inc index 811e663..e14c08b 100644 --- a/includes/prefs/userprefs.inc +++ b/includes/prefs/userprefs.inc @@ -51,6 +51,7 @@ class user_prefs $this->theme = 'default'; } else { + global $path_to_root; $this->language = $user["language"]; $_SESSION['language']->set_language($this->language); @@ -82,6 +83,8 @@ class user_prefs $this->sticky_date = 0; $this->startup_tab = "orders"; } + if (!file_exists("$path_to_root/themes/$this->theme")) + $this->theme = "default"; } } -- 2.30.2