summaryrefslogtreecommitdiff
path: root/program/steps/settings/save_prefs.inc
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2010-09-18 16:32:00 +0000
committerthomascube <thomas@roundcube.net>2010-09-18 16:32:00 +0000
commit62c791f60923e12ef157f6de7018d0f7ada47911 (patch)
tree16d6c4db1788a6e993508f2b9268b3f759588e29 /program/steps/settings/save_prefs.inc
parentffc040bf9ea603ab9c5d752a222caf22627643c7 (diff)
Prevent from saving a non-existing skin path in user prefs
Diffstat (limited to 'program/steps/settings/save_prefs.inc')
-rw-r--r--program/steps/settings/save_prefs.inc5
1 files changed, 3 insertions, 2 deletions
diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc
index 3f13c0af4..a8ff87869 100644
--- a/program/steps/settings/save_prefs.inc
+++ b/program/steps/settings/save_prefs.inc
@@ -116,8 +116,9 @@ switch ($CURR_SECTION)
$OUTPUT->command('reload', 500);
}
- // switch skin
- $OUTPUT->set_skin($a_user_prefs['skin']);
+ // switch skin (if valid, otherwise unset the pref and fall back to default)
+ if (!$OUTPUT->set_skin($a_user_prefs['skin']))
+ unset($a_user_prefs['skin']);
// force min size
if ($a_user_prefs['pagesize'] < 1)