Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev
This commit is contained in:
commit
3af3b36db3
@ -25,6 +25,7 @@ class Helpindex {
|
|||||||
|
|
||||||
|
|
||||||
// TODO: Implement support for translations in hierarchical table of content files
|
// TODO: Implement support for translations in hierarchical table of content files
|
||||||
|
/*
|
||||||
if(argc() > 2) {
|
if(argc() > 2) {
|
||||||
$path = '';
|
$path = '';
|
||||||
for($x = 1; $x < argc(); $x ++) {
|
for($x = 1; $x < argc(); $x ++) {
|
||||||
@ -36,6 +37,7 @@ class Helpindex {
|
|||||||
$levels[] = preg_replace('/\<ul(.*?)\>/','<ul class="nav nav-pills flex-column">',$y);
|
$levels[] = preg_replace('/\<ul(.*?)\>/','<ul class="nav nav-pills flex-column">',$y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if($level_0)
|
if($level_0)
|
||||||
$o .= $level_0;
|
$o .= $level_0;
|
||||||
|
@ -28,16 +28,22 @@ function get_help_content($tocpath = false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($path) {
|
if($path) {
|
||||||
|
|
||||||
$title = basename($path);
|
$title = basename($path);
|
||||||
if(! $tocpath)
|
if(! $tocpath)
|
||||||
\App::$page['title'] = t('Help:') . ' ' . ucwords(str_replace('-',' ',notags($title)));
|
\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 &&
|
if($tocpath !== false &&
|
||||||
load_doc_file('doc/' . $path . '.md') === '' &&
|
load_doc_file('doc/' . $path . '.md') === '' &&
|
||||||
load_doc_file('doc/' . $path . '.bb') === '' &&
|
load_doc_file('doc/' . $path . '.bb') === '' &&
|
||||||
load_doc_file('doc/' . $path . '.html') === ''
|
load_doc_file('doc/' . $path . '.html') === ''
|
||||||
) {
|
) {
|
||||||
$path = 'toc';
|
$path = $title;
|
||||||
}
|
}
|
||||||
$text = load_doc_file('doc/' . $path . '.md');
|
$text = load_doc_file('doc/' . $path . '.md');
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user