MDL-52366 themes: check for templates in themedir
This commit is contained in:
committed by
David Mudrák
parent
84ad325c69
commit
ec3260126f
@@ -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/';
|
||||
|
||||
Reference in New Issue
Block a user