aboutsummaryrefslogtreecommitdiffstats
path: root/include/nav.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-04-05 15:24:42 +0200
committerMario Vavti <mario@mariovavti.com>2016-04-05 15:24:42 +0200
commitd99a1d8de0d21011879896a1cc2d9f3dd52b2bbd (patch)
tree9a5698ecd3fc841316000761701f48ecfb688489 /include/nav.php
parent0012030826030af1065d59b50aca16412be96caa (diff)
parentec41170121fc364b7d7394080c29f646720ad923 (diff)
downloadvolse-hubzilla-d99a1d8de0d21011879896a1cc2d9f3dd52b2bbd.tar.gz
volse-hubzilla-d99a1d8de0d21011879896a1cc2d9f3dd52b2bbd.tar.bz2
volse-hubzilla-d99a1d8de0d21011879896a1cc2d9f3dd52b2bbd.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev
Diffstat (limited to 'include/nav.php')
-rw-r--r--include/nav.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/include/nav.php b/include/nav.php
index 201882fd1..4bcef4425 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -149,9 +149,19 @@ EOT;
$help_url = z_root() . '/help?f=&cmd=' . App::$cmd;
- if(! get_config('system','hide_help'))
- $nav['help'] = array($help_url, t('Help'), "", t('Help and documentation'),'help_nav_btn');
-
+ if(! get_config('system','hide_help')) {
+ require_once('mod/help.php');
+ $context_help = load_doc_file('doc/context/' . $a->cmd . '/help.html');
+ $parentdir = dirname($a->cmd);
+ while (! $context_help && $parentdir !== '.') {
+ $context_help = load_doc_file('doc/context/' . $parentdir . '/help.html');
+ $parentdir = dirname($parentdir);
+ }
+ if (! $context_help ) {
+ $context_help = '';
+ }
+ $nav['help'] = array($help_url, t('Help'), "", t('Help and documentation'),'help_nav_btn',$context_help);
+ }
if(! UNO)
$nav['apps'] = array('apps', t('Apps'), "", t('Applications, utilities, links, games'),'apps_nav_btn');