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
* 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;
}
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']);
}
}
+
+
/* initialise content region */
if(! x($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