aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Web/Router.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-03-08 09:39:46 +0100
committerMario Vavti <mario@mariovavti.com>2017-03-08 09:39:46 +0100
commitbc2b948f1f6e62b1c277a4042200bb6678956f3f (patch)
tree8586c30e495607eee23f16c0aad40974f0711275 /Zotlabs/Web/Router.php
parent23e3e2c50499fab52769929a448e73012fd915af (diff)
parentff9442474d07cce24c8f66db39ec34471c3874a2 (diff)
downloadvolse-hubzilla-2.2.tar.gz
volse-hubzilla-2.2.tar.bz2
volse-hubzilla-2.2.zip
Merge branch 2.2RC2.2
Diffstat (limited to 'Zotlabs/Web/Router.php')
-rw-r--r--Zotlabs/Web/Router.php25
1 files changed, 10 insertions, 15 deletions
diff --git a/Zotlabs/Web/Router.php b/Zotlabs/Web/Router.php
index 271836ba9..ba2e78b25 100644
--- a/Zotlabs/Web/Router.php
+++ b/Zotlabs/Web/Router.php
@@ -121,29 +121,24 @@ class Router {
/*
* The URL provided does not resolve to a valid module.
- *
- * On Dreamhost sites, quite often things go wrong for no apparent reason and they send us to '/internal_error.html'.
- * We don't like doing this, but as it occasionally accounts for 10-20% or more of all site traffic -
- * we are going to trap this and redirect back to the requested page. As long as you don't have a critical error on your page
- * this will often succeed and eventually do the right thing.
- *
- * Otherwise we are going to emit a 404 not found.
*/
if(! (\App::$module_loaded)) {
- // Stupid browser tried to pre-fetch our Javascript img template. Don't log the event or return anything - just quietly exit.
+ $x = [
+ 'module' => $module,
+ 'installed' => \App::$module_loaded,
+ 'controller' => $this->controller
+ ];
+ call_hooks('page_not_found',$x);
+
+ // Stupid browser tried to pre-fetch our Javascript img template.
+ // Don't log the event or return anything - just quietly exit.
+
if((x($_SERVER, 'QUERY_STRING')) && preg_match('/{[0-9]}/', $_SERVER['QUERY_STRING']) !== 0) {
killme();
}
- 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_DEBUG);
- goaway(z_root() . $_SERVER['REQUEST_URI']);
- }
-
if(get_config('system','log_404',true)) {
logger("Module {$module} not found.", LOGGER_DEBUG, LOG_WARNING);
logger('index.php: page not found: ' . $_SERVER['REQUEST_URI']