diff options
author | Stefan Parviainen <saparvia@caterva.eu> | 2015-01-18 10:26:05 +0100 |
---|---|---|
committer | Stefan Parviainen <saparvia@caterva.eu> | 2015-01-18 10:26:05 +0100 |
commit | 319b279b3a310a427cc6fd78377cffa819a61328 (patch) | |
tree | 7401f8182523db91b23cde8123f933f1bcfea459 | |
parent | 8c6576baa5d27fbc7b3c205a7fb38d345f55765e (diff) | |
download | volse-hubzilla-319b279b3a310a427cc6fd78377cffa819a61328.tar.gz volse-hubzilla-319b279b3a310a427cc6fd78377cffa819a61328.tar.bz2 volse-hubzilla-319b279b3a310a427cc6fd78377cffa819a61328.zip |
Don't try to open unexisting files in help
-rw-r--r-- | mod/help.php | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/mod/help.php b/mod/help.php index a3dafcc9b..5cdeda58f 100644 --- a/mod/help.php +++ b/mod/help.php @@ -39,18 +39,19 @@ function help_content(&$a) { if(argc() > 1) { $text = load_doc_file('doc/' . $a->argv[1] . '.md'); $a->page['title'] = t('Help:') . ' ' . ucwords(str_replace('-',' ',notags(argv(1)))); - } - if(! $text) { - $text = load_doc_file('doc/' . $a->argv[1] . '.bb'); - if($text) - $doctype = 'bbcode'; - $a->page['title'] = t('Help:') . ' ' . ucwords(str_replace('_',' ',notags(argv(1)))); - } - if(! $text) { - $text = load_doc_file('doc/' . $a->argv[1] . '.html'); - if($text) - $doctype = 'html'; - $a->page['title'] = t('Help:') . ' ' . ucwords(str_replace('-',' ',notags(argv(1)))); + + if(! $text) { + $text = load_doc_file('doc/' . $a->argv[1] . '.bb'); + if($text) + $doctype = 'bbcode'; + $a->page['title'] = t('Help:') . ' ' . ucwords(str_replace('_',' ',notags(argv(1)))); + } + if(! $text) { + $text = load_doc_file('doc/' . $a->argv[1] . '.html'); + if($text) + $doctype = 'html'; + $a->page['title'] = t('Help:') . ' ' . ucwords(str_replace('-',' ',notags(argv(1)))); + } } if(! $text) { |