Commit 4784e3fe authored by Evan Prodromou's avatar Evan Prodromou

correctly parse help files

parent 9c12aa29
...@@ -57,7 +57,7 @@ class DocFile ...@@ -57,7 +57,7 @@ class DocFile
static function forTitle($title, $paths) static function forTitle($title, $paths)
{ {
if (is_string($paths)) { if (!is_array($paths)) {
$paths = array($paths); $paths = array($paths);
} }
...@@ -66,6 +66,7 @@ class DocFile ...@@ -66,6 +66,7 @@ class DocFile
foreach ($paths as $path) { foreach ($paths as $path) {
$def = $path.'/'.$title; $def = $path.'/'.$title;
if (!file_exists($def)) { if (!file_exists($def)) {
$def = null; $def = null;
} }
...@@ -95,7 +96,7 @@ class DocFile ...@@ -95,7 +96,7 @@ class DocFile
$this->contents = file_get_contents($this->filename); $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() static function defaultPaths()
...@@ -108,6 +109,8 @@ class DocFile ...@@ -108,6 +109,8 @@ class DocFile
if (!empty($site)) { if (!empty($site)) {
array_unshift($paths, INSTALLDIR.'/local/doc-src/'.$site.'/'); array_unshift($paths, INSTALLDIR.'/local/doc-src/'.$site.'/');
} }
return $paths;
} }
static function negotiateLanguage($filenames, $defaultFilename=null) static function negotiateLanguage($filenames, $defaultFilename=null)
......
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