From 657b34c012210bb916adca878b08789d1b347103 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 20 Apr 2016 22:50:59 -0700 Subject: change the 404 warning from the router to reflect the new architecture --- Zotlabs/Web/Router.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Web/Router.php b/Zotlabs/Web/Router.php index 6376f7697..665aa676c 100644 --- a/Zotlabs/Web/Router.php +++ b/Zotlabs/Web/Router.php @@ -84,11 +84,9 @@ class Router { include_once("mod/{$module}.php"); \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. * 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. */ - $x = array('module' => $module, 'installed' => false); + $x = array('module' => $module, 'installed' => \App::$module_loaded); call_hooks('module_loaded', $x); if($x['installed']) \App::$module_loaded = true; + /** * The URL provided does not resolve to a valid module. * @@ -119,6 +118,8 @@ class Router { 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']) { logger('index.php: dreamhost_error_hack invoked. Original URI =' . $_SERVER['REQUEST_URI']); goaway(z_root() . $_SERVER['REQUEST_URI']); -- cgit v1.2.3