diff options
author | redmatrix <git@macgirvin.com> | 2016-04-05 12:51:22 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-04-05 12:51:22 -0700 |
commit | a7d5bf6854d207b4cb976a3f7773caf5a4c89801 (patch) | |
tree | 114d6cb852543340bee555d0bc447db8d0bf776f /include | |
parent | 0e7a963173833c1c63fae750cc8b1c3a9bf12f54 (diff) | |
parent | bd29551f9aec4c463c02a3c57a5d6d94c9ee318d (diff) | |
download | volse-hubzilla-a7d5bf6854d207b4cb976a3f7773caf5a4c89801.tar.gz volse-hubzilla-a7d5bf6854d207b4cb976a3f7773caf5a4c89801.tar.bz2 volse-hubzilla-a7d5bf6854d207b4cb976a3f7773caf5a4c89801.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'include')
-rw-r--r-- | include/nav.php | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/include/nav.php b/include/nav.php index 201882fd1..e8c1a2e92 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/' . App::$cmd . '/help.html'); + $parentdir = dirname(App::$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'); @@ -256,7 +266,6 @@ $powered_by = ''; * */ function nav_set_selected($item){ - $a = get_app(); App::$nav_sel = array( 'community' => null, 'network' => null, |