diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-09-01 10:41:07 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-09-01 10:41:07 +0200 |
commit | 3af3b36db3ef1ab0f8b5987a13d9adca482d0952 (patch) | |
tree | ca2187b520502ba903d32bedac1eb5d49c94ca3c | |
parent | 7a42aed1f6800f31eda01f89a7f2971efea531a5 (diff) | |
parent | 9333503600c2775ec6e95a9f3c0dcc3cc77a3282 (diff) | |
download | volse-hubzilla-3af3b36db3ef1ab0f8b5987a13d9adca482d0952.tar.gz volse-hubzilla-3af3b36db3ef1ab0f8b5987a13d9adca482d0952.tar.bz2 volse-hubzilla-3af3b36db3ef1ab0f8b5987a13d9adca482d0952.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev
-rw-r--r-- | Zotlabs/Widget/Helpindex.php | 2 | ||||
-rw-r--r-- | include/help.php | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/Zotlabs/Widget/Helpindex.php b/Zotlabs/Widget/Helpindex.php index 8299cf16a..6c8748194 100644 --- a/Zotlabs/Widget/Helpindex.php +++ b/Zotlabs/Widget/Helpindex.php @@ -25,6 +25,7 @@ class Helpindex { // TODO: Implement support for translations in hierarchical table of content files + /* if(argc() > 2) { $path = ''; for($x = 1; $x < argc(); $x ++) { @@ -36,6 +37,7 @@ class Helpindex { $levels[] = preg_replace('/\<ul(.*?)\>/','<ul class="nav nav-pills flex-column">',$y); } } + */ if($level_0) $o .= $level_0; 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'); |