Merge branch 'MDL-52366-32-mustachethemedir' of git://github.com/mudrd8mz/moodle into MOODLE_32_STABLE

This commit is contained in:
David Monllao
2016-12-28 12:23:49 +01:00
@@ -76,10 +76,16 @@ class mustache_template_finder {
// First check the theme.
$dirs[] = $CFG->dirroot . '/theme/' . $themename . '/templates/' . $component . '/';
if (isset($CFG->themedir)) {
$dirs[] = $CFG->themedir . '/' . $themename . '/templates/' . $component . '/';
}
// Now check the parent themes.
// Search each of the parent themes second.
foreach ($parents as $parent) {
$dirs[] = $CFG->dirroot . '/theme/' . $parent . '/templates/' . $component . '/';
if (isset($CFG->themedir)) {
$dirs[] = $CFG->themedir . '/' . $parent . '/templates/' . $component . '/';
}
}
$dirs[] = $compdirectory . '/templates/';