mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 20:53:53 +01:00
MDL-49800 core_output: Templates are not allowed in sub directories
This commit is contained in:
parent
9b67b43b21
commit
60de7df148
@ -49,6 +49,9 @@ class mustache_filesystem_loader extends \Mustache_Loader_FilesystemLoader {
|
||||
throw new coding_exception('Templates names must be specified as "componentname/templatename" (' . $name . ' requested) ');
|
||||
}
|
||||
list($component, $templatename) = explode('/', $name, 2);
|
||||
if (strpos($templatename, '/') !== false) {
|
||||
throw new coding_exception('Templates cannot be placed in sub directories (' . $name . ' requested)');
|
||||
}
|
||||
return parent::getFileName($templatename);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user