static function forTitle($title, $paths)
{
- if (is_string($paths)) {
+ if (!is_array($paths)) {
$paths = array($paths);
}
foreach ($paths as $path) {
$def = $path.'/'.$title;
+
if (!file_exists($def)) {
$def = null;
}
$this->contents = file_get_contents($this->filename);
}
- $this->output = common_markup_to_html($this->contents);
+ return common_markup_to_html($this->contents);
}
static function defaultPaths()
if (!empty($site)) {
array_unshift($paths, INSTALLDIR.'/local/doc-src/'.$site.'/');
}
+
+ return $paths;
}
static function negotiateLanguage($filenames, $defaultFilename=null)