Skip to content
Snippets Groups Projects
Commit 0649da99 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

Merge branch 'master' into svgpagetools

* master:
  support autoloading for templates
parents 5172d49d f83f0fd0
No related branches found
No related tags found
No related merge requests found
......@@ -121,6 +121,16 @@ function load_autoload($name){
}
}
// template namespace
if(substr($name, 0, 18) == 'dokuwiki/template/') {
$name = str_replace('/test/', '/_test/', $name); // no underscore in test namespace
$file = DOKU_INC.'lib/tpl/' . substr($name, 18) . '.php';
if(file_exists($file)) {
require $file;
return true;
}
}
// our own namespace
if(substr($name, 0, 9) == 'dokuwiki/') {
require substr($name, 9) . '.php';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment