]> git.mjollnir.org Git - moodle.git/commitdiff
Revert to standardwhite if theme is missing MDL-6257
authormoodler <moodler>
Thu, 14 Sep 2006 05:15:06 +0000 (05:15 +0000)
committermoodler <moodler>
Thu, 14 Sep 2006 05:15:06 +0000 (05:15 +0000)
lib/weblib.php

index a635b186d364861505a23da659b98e397f4af496..ca8f543c3a1c42d6ee53fdb31ceeb5256982cc6a 100644 (file)
@@ -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