-
Bug
-
Resolution: Fixed
-
Minor
-
2.9.3, 3.0, 3.1, 3.2
-
MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE
-
MOODLE_31_STABLE, MOODLE_32_STABLE
-
MDL-52366-master-mustachethemedir -
-
Whilst looking at the code in the method 'get_template_directories_for_component' of the class 'mustache_template_finder' in /lib/classes/output/mustache_template_finder.php it reads:
....
|
// Find the parent themes.
|
$parents = array();
|
if ($themename === $PAGE->theme->name) {
|
$parents = $PAGE->theme->parents;
|
} else {
|
$themeconfig = theme_config::load($themename);
|
$parents = $themeconfig->parents;
|
}
|
|
// First check the theme.
|
$dirs[] = $CFG->dirroot . '/theme/' . $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 . '/';
|
}
|
|
$dirs[] = $compdirectory . '/templates/';
|
....
|
But what is missing is checking to see if the theme is installed in $CFG->themedir. Thus as it currently stands any theme installed in $CFG->themedir would not have its overridden Mustache templates used.