aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Web/Router.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-12-10 15:08:54 +0100
committerMario Vavti <mario@mariovavti.com>2016-12-10 15:08:54 +0100
commitdc6455690278c40dda03247456de24a26d7cf54b (patch)
treecb7ae58c755097992dc3b67a2aee7604ff3cf834 /Zotlabs/Web/Router.php
parent0315077daf3c2d112737fb27b05abf90fc45212a (diff)
parent7237bacec03092aa6d5a774cb8d8030731919500 (diff)
downloadvolse-hubzilla-dc6455690278c40dda03247456de24a26d7cf54b.tar.gz
volse-hubzilla-dc6455690278c40dda03247456de24a26d7cf54b.tar.bz2
volse-hubzilla-dc6455690278c40dda03247456de24a26d7cf54b.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev
Diffstat (limited to 'Zotlabs/Web/Router.php')
-rw-r--r--Zotlabs/Web/Router.php18
1 files changed, 12 insertions, 6 deletions
diff --git a/Zotlabs/Web/Router.php b/Zotlabs/Web/Router.php
index a3bad29ae..271836ba9 100644
--- a/Zotlabs/Web/Router.php
+++ b/Zotlabs/Web/Router.php
@@ -137,15 +137,21 @@ 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']);
+ 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']);
}
- logger('index.php: page not found: ' . $_SERVER['REQUEST_URI'] . ' ADDRESS: ' . $_SERVER['REMOTE_ADDR'] . ' QUERY: ' . $_SERVER['QUERY_STRING'], LOGGER_DEBUG);
- header($_SERVER['SERVER_PROTOCOL'] . ' 404 ' . t('Not Found'));
+ 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']
+ . ' ADDRESS: ' . $_SERVER['REMOTE_ADDR'] . ' QUERY: '
+ . $_SERVER['QUERY_STRING'], LOGGER_DEBUG);
+ }
+
+ header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
$tpl = get_markup_template('404.tpl');
\App::$page['content'] = replace_macros($tpl, array(
'$message' => t('Page not found.')