diff options
author | Habeas Codice <habeascodice@federated.social> | 2015-01-28 17:40:39 -0800 |
---|---|---|
committer | Habeas Codice <habeascodice@federated.social> | 2015-01-28 17:40:39 -0800 |
commit | d59bd31a682a58e0d34a66e06ce8f504189f98d5 (patch) | |
tree | 3a34b706f63f8f41bb76c5a049f3bc356d8c265f /mod/help.php | |
parent | 1a537888333afb052e9eb4954091fd163f5b78d1 (diff) | |
parent | 54fd8b21db2d8f3841cf590f88611a1d4f44ce48 (diff) | |
download | volse-hubzilla-d59bd31a682a58e0d34a66e06ce8f504189f98d5.tar.gz volse-hubzilla-d59bd31a682a58e0d34a66e06ce8f504189f98d5.tar.bz2 volse-hubzilla-d59bd31a682a58e0d34a66e06ce8f504189f98d5.zip |
Merge branch 'master' of https://github.com/friendica/red
Diffstat (limited to 'mod/help.php')
-rw-r--r-- | mod/help.php | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/mod/help.php b/mod/help.php index 5cdeda58f..0081e54e7 100644 --- a/mod/help.php +++ b/mod/help.php @@ -37,20 +37,28 @@ function help_content(&$a) { $text = ''; if(argc() > 1) { - $text = load_doc_file('doc/' . $a->argv[1] . '.md'); - $a->page['title'] = t('Help:') . ' ' . ucwords(str_replace('-',' ',notags(argv(1)))); + $path = ''; + for($x = 1; $x < argc(); $x ++) { + if(strlen($path)) + $path .= '/'; + $path .= argv($x); + } + $title = basename($path); + + $text = load_doc_file('doc/' . $path . '.md'); + $a->page['title'] = t('Help:') . ' ' . ucwords(str_replace('-',' ',notags($title))); if(! $text) { - $text = load_doc_file('doc/' . $a->argv[1] . '.bb'); + $text = load_doc_file('doc/' . $path . '.bb'); if($text) $doctype = 'bbcode'; - $a->page['title'] = t('Help:') . ' ' . ucwords(str_replace('_',' ',notags(argv(1)))); + $a->page['title'] = t('Help:') . ' ' . ucwords(str_replace('_',' ',notags($title))); } if(! $text) { - $text = load_doc_file('doc/' . $a->argv[1] . '.html'); + $text = load_doc_file('doc/' . $path . '.html'); if($text) $doctype = 'html'; - $a->page['title'] = t('Help:') . ' ' . ucwords(str_replace('-',' ',notags(argv(1)))); + $a->page['title'] = t('Help:') . ' ' . ucwords(str_replace('-',' ',notags($title))); } } |