From: moodler Date: Thu, 14 Sep 2006 05:15:06 +0000 (+0000) Subject: Revert to standardwhite if theme is missing MDL-6257 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=09ad59dcb89f66bb52020c20a14a2fb4f2c9be39;p=moodle.git Revert to standardwhite if theme is missing MDL-6257 --- diff --git a/lib/weblib.php b/lib/weblib.php index a635b186d3..ca8f543c3a 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -2509,6 +2509,11 @@ function theme_setup($theme = '', $params=NULL) { $theme = current_theme(); } +/// If the theme doesn't exist for some reason then revert to standardwhite + if (!file_exists($CFG->themedir. $theme .'/config.php')) { + $CFG->theme = $theme = 'standardwhite'; + } + /// Load up the theme config $THEME = NULL; // Just to be sure include($CFG->themedir. $theme .'/config.php'); // Main config for current theme