MDL-36946 theme Use server default theme before standard

This commit is contained in:
Michael Aherne 2012-11-30 12:11:07 +00:00
parent 020e338dee
commit 2211f50422

View File

@ -364,6 +364,9 @@ class theme_config {
} else if ($themename == theme_config::DEFAULT_THEME) { } else if ($themename == theme_config::DEFAULT_THEME) {
throw new coding_exception('Default theme '.theme_config::DEFAULT_THEME.' not available or broken!'); 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 { } else {
// bad luck, the requested theme has some problems - admin see details in theme config // 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)); return new theme_config(theme_config::find_theme_config(theme_config::DEFAULT_THEME, $settings));