From 4784e3fe36a64d15fa3fc666cf165b39235d3e53 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 18 Apr 2011 06:30:33 -0400 Subject: [PATCH] correctly parse help files --- lib/docfile.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/docfile.php b/lib/docfile.php index ca03370d29..9659a43324 100644 --- a/lib/docfile.php +++ b/lib/docfile.php @@ -57,7 +57,7 @@ class DocFile static function forTitle($title, $paths) { - if (is_string($paths)) { + if (!is_array($paths)) { $paths = array($paths); } @@ -66,6 +66,7 @@ class DocFile foreach ($paths as $path) { $def = $path.'/'.$title; + if (!file_exists($def)) { $def = null; } @@ -95,7 +96,7 @@ class DocFile $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() @@ -108,6 +109,8 @@ class DocFile if (!empty($site)) { array_unshift($paths, INSTALLDIR.'/local/doc-src/'.$site.'/'); } + + return $paths; } static function negotiateLanguage($filenames, $defaultFilename=null) -- 2.39.5