]> git.wh0rd.org - tt-rss.git/commitdiff
preferences: set themes dropdown to default if selected theme is missing
authorAndrew Dolgov <noreply@fakecake.org>
Thu, 26 Jan 2017 19:37:22 +0000 (22:37 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Thu, 26 Jan 2017 19:37:22 +0000 (22:37 +0300)
classes/pref/prefs.php

index bf4d6e42e7d430d4d0618b6e1047a11749c7c16a..18ffcc720cd0f08e19965cd48f996c0a6ddc4928 100644 (file)
@@ -570,6 +570,8 @@ class Pref_Prefs extends Handler_Protected {
                                $themes = array_filter($themes, "theme_valid");
                                asort($themes);
 
+                               if (!theme_valid($value)) $value = "default.php";
+
                                print_select($pref_name, $value, $themes,
                                        'dojoType="dijit.form.Select"');