X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fhelp.php;h=6d8fbb1842295fd67814de01657ecd310c6d5936;hb=27fa20ab228e47a7e5400a2cc61ada6f5ea34799;hp=af05bd47c08109bbd23e70c8b960e7ba66f4decc;hpb=43d5876e8b35d53a0bef5248c5d63e5bc209dbbf;p=friendica.git diff --git a/mod/help.php b/mod/help.php index af05bd47c0..6d8fbb1842 100644 --- a/mod/help.php +++ b/mod/help.php @@ -1,47 +1,53 @@ argc > 1) { + if ($a->argc > 1) { $text = load_doc_file('doc/' . $a->argv[1] . '.md'); - $a->page['title'] = t('Help:') . ' ' . str_replace('-',' ',notags($a->argv[1])); + $a->page['title'] = t('Help:') . ' ' . str_replace('-', ' ', notags($a->argv[1])); } - if(! $text) { - $text = load_doc_file('doc/Home.md'); + $home = load_doc_file('doc/Home.md'); + if (!$text) { + $text = $home; $a->page['title'] = t('Help'); + } else { + $a->page['aside'] = Markdown($home); } - - if(! strlen($text)) { + + if (!strlen($text)) { header($_SERVER["SERVER_PROTOCOL"] . ' 404 ' . t('Not Found')); $tpl = get_markup_template("404.tpl"); return replace_macros($tpl, array( - '$message' => t('Page not found.' ) - )); + '$message' => t('Page not found.') + )); } - - return Markdown($text); + + $html = Markdown($text); + $html = "".$html; + return $html; }