From 4f1bce6046ef243595983e25e3ae1a48b54c5949 Mon Sep 17 00:00:00 2001 From: Andre Lorbach Date: Mon, 15 Dec 2008 17:07:22 +0100 Subject: [PATCH 1/4] Fixed typo in textual month detection, which caused date detection problems in december only. --- src/include/functions_common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/functions_common.php b/src/include/functions_common.php index 4fbc761..e935eaa 100644 --- a/src/include/functions_common.php +++ b/src/include/functions_common.php @@ -1180,7 +1180,7 @@ function GetMonthFromString($szMonth) return 10; case "Nov": return 11; - case "Dez": + case "Dec": return 12; } } From 69089e75431f74a3e6c4884f5b77adf50c675707 Mon Sep 17 00:00:00 2001 From: Andre Lorbach Date: Wed, 17 Dec 2008 10:12:10 +0100 Subject: [PATCH 2/4] FIxed missing include of debug functions in maintenance.php --- src/cron/maintenance.php | 3 ++- src/include/functions_common.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cron/maintenance.php b/src/cron/maintenance.php index 44b0287..8ba593c 100644 --- a/src/cron/maintenance.php +++ b/src/cron/maintenance.php @@ -36,7 +36,8 @@ define('IN_PHPLOGCON', true); $gl_root_path = './../'; // Now include necessary include files! -include($gl_root_path . 'include/functions_common.php'); +include_once($gl_root_path . 'include/functions_common.php'); +include_once($gl_root_path . 'include/functions_debugoutput.php'); // Set commandline mode for the script define('IN_PHPLOGCON_COMMANDLINE', true); diff --git a/src/include/functions_common.php b/src/include/functions_common.php index e935eaa..f31fa4c 100644 --- a/src/include/functions_common.php +++ b/src/include/functions_common.php @@ -521,7 +521,7 @@ function InitRuntimeInformations() global $gl_root_path, $content; // Enable GZIP Compression if enabled! - if (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false && GetConfigSetting("MiscEnableGzipCompression", 1, CFGLEVEL_USER) == 1 ) + if ( isset($_SERVER['HTTP_ACCEPT_ENCODING']) && strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false && GetConfigSetting("MiscEnableGzipCompression", 1, CFGLEVEL_USER) == 1 ) { // This starts gzip compression! ob_start("ob_gzhandler"); From 5c43460fdd063aeaf535189cb22dbcf639345c26 Mon Sep 17 00:00:00 2001 From: Andre Lorbach Date: Fri, 19 Dec 2008 15:01:58 +0100 Subject: [PATCH 3/4] Added some performance tweaks into mysql db driver, which will make searching for strings within messages faster. --- src/classes/logstreamdb.class.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/classes/logstreamdb.class.php b/src/classes/logstreamdb.class.php index e8bb4be..fda8257 100644 --- a/src/classes/logstreamdb.class.php +++ b/src/classes/logstreamdb.class.php @@ -432,6 +432,10 @@ class LogStreamDB extends LogStream { { global $querycount, $dbmapping; $szTableType = $this->_logStreamConfigObj->DBTableType; + + // Only perform query if row counting is enabled! + if ( strlen($this->_SQLwhereClause) > 0 && !$this->_logStreamConfigObj->DBEnableRowCounting ) + return $this->_firstPageUID; $szSql = "SELECT MAX(" . $dbmapping[$szTableType][SYSLOG_UID] . ") FROM " . $this->_logStreamConfigObj->DBTableName . $this->_SQLwhereClause; $myQuery = mysql_query($szSql, $this->_dbhandle); @@ -461,6 +465,10 @@ class LogStreamDB extends LogStream { global $querycount, $dbmapping; $szTableType = $this->_logStreamConfigObj->DBTableType; + // Only perform query if row counting is enabled! + if ( strlen($this->_SQLwhereClause) > 0 && !$this->_logStreamConfigObj->DBEnableRowCounting ) + return $this->_lastPageUID; + $szSql = "SELECT MIN(" . $dbmapping[$szTableType][SYSLOG_UID] . ") FROM " . $this->_logStreamConfigObj->DBTableName . $this->_SQLwhereClause; $myQuery = mysql_query($szSql, $this->_dbhandle); if ($myQuery) @@ -1097,6 +1105,9 @@ class LogStreamDB extends LogStream { // Append precreated where clause $sqlString .= $this->_SQLwhereClause; + // Output SQL Query into DEBUG +// OutputDebugMessage( "CreateSQLStatement result: " . $sqlString ); + // Append ORDER clause if ( $this->_readDirection == EnumReadDirection::Forward ) $sqlString .= " ORDER BY " . $dbmapping[$szTableType][$szSortColumn]; From 587268e07fa195682cb98ae00fa5277b63175364 Mon Sep 17 00:00:00 2001 From: Andre Lorbach Date: Tue, 23 Dec 2008 16:59:23 +0100 Subject: [PATCH 4/4] Added changelog entry --- ChangeLog | 7 +++++++ src/include/functions_common.php | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1612b4a..80bb8a7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,11 @@ --------------------------------------------------------------------------- +Version 2.5.23 (beta), 2008-12-23 +- Fixed typo in textual month detection, which caused date detection + problems in december month only. +- Fixed missing include of debug functions in maintenance.php +- Added some performance tweaks into mysql db driver, which will make + searching for strings within messages faster. +--------------------------------------------------------------------------- Version 2.5.22 (beta), 2008-12-10 - Added workaround for year detection for RFC 3164 like timestamps. This also resolves issues of the syslog date detection on new year. diff --git a/src/include/functions_common.php b/src/include/functions_common.php index f31fa4c..21a3813 100644 --- a/src/include/functions_common.php +++ b/src/include/functions_common.php @@ -66,7 +66,7 @@ $LANG_EN = "en"; // Used for fallback $LANG = "en"; // Default language // Default Template vars -$content['BUILDNUMBER'] = "2.5.22"; +$content['BUILDNUMBER'] = "2.5.23"; $content['TITLE'] = "phpLogCon :: Release " . $content['BUILDNUMBER']; // Default page title $content['BASEPATH'] = $gl_root_path; $content['SHOW_DONATEBUTTON'] = true; // Default = true!