change the 404 warning from the router to reflect the new architecture
This commit is contained in:
parent
5eb594706b
commit
657b34c012
@ -84,11 +84,9 @@ class Router {
|
|||||||
include_once("mod/{$module}.php");
|
include_once("mod/{$module}.php");
|
||||||
\App::$module_loaded = true;
|
\App::$module_loaded = true;
|
||||||
}
|
}
|
||||||
else logger("mod/{$module}.php not found.");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This provides a place for plugins to register module handlers which don't otherwise exist on the system.
|
* This provides a place for plugins to register module handlers which don't otherwise exist on the system.
|
||||||
* If the plugin sets 'installed' to true we won't throw a 404 error for the specified module even if
|
* If the plugin sets 'installed' to true we won't throw a 404 error for the specified module even if
|
||||||
@ -96,11 +94,12 @@ class Router {
|
|||||||
* The plugin should catch at least one of the module hooks for this URL.
|
* The plugin should catch at least one of the module hooks for this URL.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$x = array('module' => $module, 'installed' => false);
|
$x = array('module' => $module, 'installed' => \App::$module_loaded);
|
||||||
call_hooks('module_loaded', $x);
|
call_hooks('module_loaded', $x);
|
||||||
if($x['installed'])
|
if($x['installed'])
|
||||||
\App::$module_loaded = true;
|
\App::$module_loaded = true;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The URL provided does not resolve to a valid module.
|
* The URL provided does not resolve to a valid module.
|
||||||
*
|
*
|
||||||
@ -119,6 +118,8 @@ class Router {
|
|||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger("Module {$module} not found.", LOGGER_DEBUG, LOG_WARNING);
|
||||||
|
|
||||||
if((x($_SERVER, 'QUERY_STRING')) && ($_SERVER['QUERY_STRING'] === 'q=internal_error.html') && \App::$config['system']['dreamhost_error_hack']) {
|
if((x($_SERVER, 'QUERY_STRING')) && ($_SERVER['QUERY_STRING'] === 'q=internal_error.html') && \App::$config['system']['dreamhost_error_hack']) {
|
||||||
logger('index.php: dreamhost_error_hack invoked. Original URI =' . $_SERVER['REQUEST_URI']);
|
logger('index.php: dreamhost_error_hack invoked. Original URI =' . $_SERVER['REQUEST_URI']);
|
||||||
goaway(z_root() . $_SERVER['REQUEST_URI']);
|
goaway(z_root() . $_SERVER['REQUEST_URI']);
|
||||||
|
Reference in New Issue
Block a user