Merge branch 'beta' into devel

Conflicts:

	src/include/functions_common.php
This commit is contained in:
Andre Lorbach 2008-12-23 17:00:18 +01:00
commit 62b15da86b
4 changed files with 22 additions and 3 deletions

View File

@ -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.

View File

@ -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];

View File

@ -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);

View File

@ -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");
@ -1180,7 +1180,7 @@ function GetMonthFromString($szMonth)
return 10;
case "Nov":
return 11;
case "Dez":
case "Dec":
return 12;
}
}