From: Joe Hunt Date: Sun, 27 Jan 2013 00:35:23 +0000 (+0100) Subject: 0002032: user_theme() should return default if theme does not exist X-Git-Tag: 2.3-final~329 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=c2375734616ad4b9a96339d41847c0ba33787cf9;p=fa-stable.git 0002032: user_theme() should return default if theme does not exist --- 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"; } }