aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-01-27 11:48:10 -0800
committerfriendica <info@friendica.com>2015-01-27 11:48:10 -0800
commitf62383e648b50787a5456e452cf5b590d67d0ff4 (patch)
tree4885125b6e8a99f3599d6e28b5b49ddc44a460c0
parentefb6842d748ad35f2843619983a4e3e9b14617a9 (diff)
downloadvolse-hubzilla-f62383e648b50787a5456e452cf5b590d67d0ff4.tar.gz
volse-hubzilla-f62383e648b50787a5456e452cf5b590d67d0ff4.tar.bz2
volse-hubzilla-f62383e648b50787a5456e452cf5b590d67d0ff4.zip
allow doc/help system to use subdirs
-rw-r--r--mod/help.php20
-rw-r--r--version.inc2
2 files changed, 15 insertions, 7 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)));
}
}
diff --git a/version.inc b/version.inc
index 5a4a46961..f140c0f66 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2015-01-26.928
+2015-01-27.929