MDL-36946 theme Use server default theme before standard
authorMichael Aherne <michael.aherne@strath.ac.uk>
Fri, 30 Nov 2012 12:11:07 +0000 (12:11 +0000)
committerMichael Aherne <michael.aherne@strath.ac.uk>
Fri, 30 Nov 2012 12:11:07 +0000 (12:11 +0000)
lib/outputlib.php

index da1761b..530ba31 100644 (file)
@@ -364,6 +364,9 @@ class theme_config {
         } else if ($themename == theme_config::DEFAULT_THEME) {
             throw new coding_exception('Default theme '.theme_config::DEFAULT_THEME.' not available or broken!');
 
+        } else if ($config = theme_config::find_theme_config($CFG->theme, $settings)) {
+            return new theme_config($config);
+
         } else {
             // bad luck, the requested theme has some problems - admin see details in theme config
             return new theme_config(theme_config::find_theme_config(theme_config::DEFAULT_THEME, $settings));