issue #340
This commit is contained in:
parent
adad8f2ebc
commit
a20ef706fd
@ -151,15 +151,7 @@ EOT;
|
|||||||
|
|
||||||
if(! get_config('system','hide_help')) {
|
if(! get_config('system','hide_help')) {
|
||||||
require_once('mod/help.php');
|
require_once('mod/help.php');
|
||||||
$context_help = load_doc_file('doc/context/' . App::$cmd . '/help.html');
|
$context_help = load_context_help();
|
||||||
$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);
|
$nav['help'] = array($help_url, t('Help'), "", t('Help and documentation'),'help_nav_btn',$context_help);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
14
mod/help.php
14
mod/help.php
@ -84,7 +84,21 @@ function doc_rank_sort($s1,$s2) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function load_context_help() {
|
||||||
|
|
||||||
|
$path = App::$cmd;
|
||||||
|
$args = App::$argv;
|
||||||
|
|
||||||
|
while($path) {
|
||||||
|
$context_help = load_doc_file('doc/context/' . $path . '/help.html');
|
||||||
|
if($context_help)
|
||||||
|
break;
|
||||||
|
array_pop($args);
|
||||||
|
$path = implode($args,'/');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $context_help;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function store_doc_file($s) {
|
function store_doc_file($s) {
|
||||||
|
Reference in New Issue
Block a user