help - make use of subfolders
This commit is contained in:
parent
28317ed9ae
commit
7530c950e3
2 changed files with 22 additions and 2 deletions
12
mod/help.php
12
mod/help.php
|
@ -27,8 +27,16 @@ function help_content(&$a) {
|
|||
$text = '';
|
||||
|
||||
if ($a->argc > 1) {
|
||||
$text = load_doc_file('doc/' . $a->argv[1] . '.md');
|
||||
$a->page['title'] = t('Help:') . ' ' . str_replace('-', ' ', notags($a->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:') . ' ' . str_replace('-', ' ', notags($title));
|
||||
}
|
||||
$home = load_doc_file('doc/Home.md');
|
||||
if (!$text) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue