From 07b6c868b3a66efc2737dfc6459b4114fea59ba0 Mon Sep 17 00:00:00 2001 From: fabrixxm Date: Wed, 17 Aug 2011 18:36:24 +0200 Subject: remove javascript to set selectect nav item. enanche img template prefetch ignoring --- index.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 80e8ca3b0..51c87cae6 100644 --- a/index.php +++ b/index.php @@ -195,8 +195,8 @@ if(strlen($a->module)) { if(! $a->module_loaded) { - // Stupid browser tried to pre-fetch our ACL img template. Don't log the event or return anything - just quietly exit. - if((x($_SERVER,'QUERY_STRING')) && strpos($_SERVER['QUERY_STRING'],'{0}') !== false) { + // 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(); } @@ -306,7 +306,6 @@ $a->page['content'] .= '
'; */ if($a->module != 'install') { - require_once('nav.php'); nav($a); } -- cgit v1.2.3 From abd65e00aba5a2581665a689e01fe9330046f001 Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Mon, 5 Sep 2011 14:01:21 +0200 Subject: Load infos and notices via ping and show them with js popup --- index.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 51c87cae6..3db8170ef 100644 --- a/index.php +++ b/index.php @@ -112,10 +112,10 @@ if(! x($_SESSION,'authenticated')) header('X-Account-Management-Status: none'); if(! x($_SESSION,'sysmsg')) - $_SESSION['sysmsg'] = ''; + $_SESSION['sysmsg'] = array(); if(! x($_SESSION,'sysmsg_info')) - $_SESSION['sysmsg_info'] = ''; + $_SESSION['sysmsg_info'] = array(); /* * check_config() is responsible for running update scripts. These automatically @@ -262,7 +262,7 @@ if(isset($homebase)) // now that we've been through the module content, see if the page reported // a permission problem and if so, a 403 response would seem to be in order. -if(stristr($_SESSION['sysmsg'], t('Permission denied'))) { +if(stristr( implode("",$_SESSION['sysmsg']), t('Permission denied'))) { header($_SERVER["SERVER_PROTOCOL"] . ' 403 ' . t('Permission denied.')); } @@ -272,7 +272,7 @@ if(stristr($_SESSION['sysmsg'], t('Permission denied'))) { * */ -if(x($_SESSION,'sysmsg')) { +/*if(x($_SESSION,'sysmsg')) { $a->page['content'] = "
{$_SESSION['sysmsg']}
\r\n" . ((x($a->page,'content')) ? $a->page['content'] : ''); $_SESSION['sysmsg']=""; @@ -283,7 +283,7 @@ if(x($_SESSION,'sysmsg_info')) { . ((x($a->page,'content')) ? $a->page['content'] : ''); $_SESSION['sysmsg_info']=""; unset($_SESSION['sysmsg_info']); -} +}*/ -- cgit v1.2.3 From 991656a3ef396d9a6bd43ddb752627c2880b17ba Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Mon, 19 Sep 2011 11:52:32 +0200 Subject: Show "404.tpl" instead of using 'notice()' in case of 404 --- index.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 3db8170ef..d3b687c55 100644 --- a/index.php +++ b/index.php @@ -207,7 +207,10 @@ if(strlen($a->module)) { 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')); - notice( t('Page not found.' ) . EOL); + $tpl = get_markup_template("404.tpl"); + $a->page['content'] = replace_macros($tpl, array( + '$message' => t('Page not found.' ) + )); } } -- cgit v1.2.3