low-level hook for loading templates
This commit is contained in:
parent
b432cc72c9
commit
c46406b209
@ -63,24 +63,29 @@ class DocFile
|
|||||||
|
|
||||||
$filename = null;
|
$filename = null;
|
||||||
|
|
||||||
foreach ($paths as $path) {
|
if (Event::handle('StartDocFileForTitle', array($title, &$paths, &$filename))) {
|
||||||
|
|
||||||
$def = $path.'/'.$title;
|
foreach ($paths as $path) {
|
||||||
|
|
||||||
if (!file_exists($def)) {
|
$def = $path.'/'.$title;
|
||||||
$def = null;
|
|
||||||
|
if (!file_exists($def)) {
|
||||||
|
$def = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$lang = glob($path.'/'.$title.'.*');
|
||||||
|
|
||||||
|
if ($lang === false) {
|
||||||
|
$lang = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($lang) || !empty($def)) {
|
||||||
|
$filename = self::negotiateLanguage($lang, $def);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$lang = glob($path.'/'.$title.'.*');
|
Event::handle('EndDocFileForTitle', array($title, $paths, &$filename));
|
||||||
|
|
||||||
if ($lang === false) {
|
|
||||||
$lang = array();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!empty($lang) || !empty($def)) {
|
|
||||||
$filename = self::negotiateLanguage($lang, $def);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($filename)) {
|
if (empty($filename)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user