Don't try to open unexisting files in help

This commit is contained in:
Stefan Parviainen 2015-01-18 10:26:05 +01:00
parent 8c6576baa5
commit 319b279b3a

View File

@ -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) {