git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit c46406b2 authored by Evan Prodromou's avatar Evan Prodromou

low-level hook for loading templates

parent b432cc72
......@@ -63,24 +63,29 @@ class DocFile
$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 = null;
}
$def = $path.'/'.$title;
$lang = glob($path.'/'.$title.'.*');
if (!file_exists($def)) {
$def = null;
}
if ($lang === false) {
$lang = array();
}
$lang = glob($path.'/'.$title.'.*');
if (!empty($lang) || !empty($def)) {
$filename = self::negotiateLanguage($lang, $def);
break;
if ($lang === false) {
$lang = array();
}
if (!empty($lang) || !empty($def)) {
$filename = self::negotiateLanguage($lang, $def);
break;
}
}
Event::handle('EndDocFileForTitle', array($title, $paths, &$filename));
}
if (empty($filename)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment