X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=index.php;h=77b5647f2bbfc6d583103fa836de494222137c8f;hb=3ad7c395fb9a33319531e04673563e7c9983d8f0;hp=d0de1b9dc69ce83da782704f4e3a34f4bb37abf6;hpb=f217a557b84129a9f2ad692069d40e7fe341cdc6;p=friendica.git diff --git a/index.php b/index.php index d0de1b9dc6..77b5647f2b 100644 --- a/index.php +++ b/index.php @@ -113,6 +113,13 @@ else check_config($a); +$arr = array('app_menu' => $a->apps); + +call_hooks('app_menu', $arr); + +$a->apps = $arr['app_menu']; + + /** * * We have already parsed the server path into $->argc and $a->argv @@ -132,10 +139,9 @@ else * further processing. */ - if(strlen($a->module)) { if(is_array($a->plugins) && in_array($a->module,$a->plugins) && file_exists("addon/{$a->module}/{$a->module}.php")) { - include("addon/{$a->module}/{$a->module}.php"); + include_once("addon/{$a->module}/{$a->module}.php"); if(function_exists($a->module . '_module')) $a->module_loaded = true; } @@ -143,7 +149,7 @@ if(strlen($a->module)) { include("mod/{$a->module}.php"); $a->module_loaded = true; } - else { + if(! $a->module_loaded) { if((x($_SERVER,'QUERY_STRING')) && ($_SERVER['QUERY_STRING'] === 'q=internal_error.html') && isset($dreamhost_error_hack)) { logger('index.php: dreamhost_error_hack invoked. Original URI =' . $_SERVER['REQUEST_URI']); goaway($a->get_baseurl() . $_SERVER['REQUEST_URI']); @@ -155,6 +161,8 @@ if(strlen($a->module)) { } } + + /* initialise content region */ if(! x($a->page,'content')) @@ -239,8 +247,10 @@ $a->page['content'] .= '
'; * */ -if($a->module != 'install') +if($a->module != 'install') { require_once('nav.php'); + nav($a); +} /** * Build the page - now that we have all the components