From c2375734616ad4b9a96339d41847c0ba33787cf9 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 811e663d..e14c08b5 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