Merged changes up to 2.3.16 into unstable
[fa-stable.git] / includes / prefs / userprefs.inc
index 400ef1e16903dbf06d2f24d39d22f718033a0581..422c741bfa9f96470e34d640d83c582030eda120 100644 (file)
@@ -53,6 +53,7 @@ class user_prefs
                        $this->transaction_days = -30;
 
                } else {
+                       global $path_to_root;
                        $this->language = $user["language"];
                        $_SESSION['language']->set_language($this->language);
 
@@ -85,6 +86,8 @@ class user_prefs
                                $this->startup_tab = "orders";
                        }
                        $this->transaction_days = $user['transaction_days'];
+                       if (!file_exists("$path_to_root/themes/$this->theme"))
+                               $this->theme = "default";
                }
        }