From eafccb2f191b89aafda0b227238e0d3f18011a5b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 4 Nov 2012 12:07:18 +0000 Subject: [PATCH] A little better debugging, handling of percent char --- inc/db/lib-mysql3.php | 2 +- inc/http-functions.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/db/lib-mysql3.php b/inc/db/lib-mysql3.php index 0f065e1189..d586a0aebe 100644 --- a/inc/db/lib-mysql3.php +++ b/inc/db/lib-mysql3.php @@ -735,7 +735,7 @@ function getArrayFromSupportedSqlEngines ($support = 'YES') { array_push($engines, $content); } elseif (isDebugModeEnabled()) { // Log it away in debug mode - logDebugMessage(__FUNCTION__, __LINE__, 'Engine ' . $content['Engine'] . ' is not supported (' . $content['Supported'] . ')'); + logDebugMessage(__FUNCTION__, __LINE__, 'Engine ' . $content['Engine'] . ' is not supported (' . $content['Supported'] . ' - ' . $support . ')'); } } // END - if } else { diff --git a/inc/http-functions.php b/inc/http-functions.php index cfa0e19fbc..cf83770388 100644 --- a/inc/http-functions.php +++ b/inc/http-functions.php @@ -862,7 +862,7 @@ function logWrongServerNameRedirect () { // Is ext-sql_patches at least version 0.9.2? if (isExtensionInstalledAndNewer('sql_patches', '0.9.2')) { // Is there an entry? - if (countSumTotalData(detectServerName(), 'server_name_log', 'server_name_id', 'server_name', TRUE, sprintf(" AND `server_name_remote_addr`='%s' AND `server_name_ua`='%s' AND `server_name_referrer`='%s'", SQL_ESCAPE(detectRemoteAddr(TRUE)), SQL_ESCAPE(detectUserAgent(TRUE)), SQL_ESCAPE(detectReferer(TRUE)))) == 1) { + if (countSumTotalData(detectServerName(), 'server_name_log', 'server_name_id', 'server_name', TRUE, str_replace('%', '{PER}', sprintf(" AND `server_name_remote_addr`='%s' AND `server_name_ua`='%s' AND `server_name_referrer`='%s'", SQL_ESCAPE(detectRemoteAddr(TRUE)), SQL_ESCAPE(detectUserAgent(TRUE)), SQL_ESCAPE(detectReferer(TRUE))))) == 1) { // Update counter, as all are the same SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_server_name_log` -- 2.39.2