diff options
author | git-marijus <mario@mariovavti.com> | 2017-09-01 10:40:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-01 10:40:24 +0200 |
commit | 9333503600c2775ec6e95a9f3c0dcc3cc77a3282 (patch) | |
tree | a83bb2e017449ab14dd23868a5788ef77e326161 /include/help.php | |
parent | 28d6b9ce168aab2f646c3e5b9925b1f40ee9cdfb (diff) | |
parent | acacea5efe76cb56f610ae30c5396e7b63be1e40 (diff) | |
download | volse-hubzilla-9333503600c2775ec6e95a9f3c0dcc3cc77a3282.tar.gz volse-hubzilla-9333503600c2775ec6e95a9f3c0dcc3cc77a3282.tar.bz2 volse-hubzilla-9333503600c2775ec6e95a9f3c0dcc3cc77a3282.zip |
Merge pull request #850 from anaqreon/doco
Fix the multiple table of content bug
Diffstat (limited to 'include/help.php')
-rw-r--r-- | include/help.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/help.php b/include/help.php index ef6b77e12..02c3cb8e4 100644 --- a/include/help.php +++ b/include/help.php @@ -28,16 +28,22 @@ function get_help_content($tocpath = false) { } if($path) { + $title = basename($path); if(! $tocpath) \App::$page['title'] = t('Help:') . ' ' . ucwords(str_replace('-',' ',notags($title))); + // Check that there is a "toc" or "sitetoc" located at the specified path. + // If there is not, then there was not a translation of the table of contents + // available and so default back to the English TOC at /doc/toc.{html,bb,md} + // TODO: This is incompatible with the hierarchical TOC construction + // defined in /Zotlabs/Widget/Helpindex.php. if($tocpath !== false && load_doc_file('doc/' . $path . '.md') === '' && load_doc_file('doc/' . $path . '.bb') === '' && load_doc_file('doc/' . $path . '.html') === '' ) { - $path = 'toc'; + $path = $title; } $text = load_doc_file('doc/' . $path . '.md'); |