From ff2e5a81d99c460d4de13e19a75f38cb4894415f Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Fri, 12 Dec 2014 23:13:44 +0100 Subject: [PATCH] strip query log to minimum info not available in apache logs --- lib/log.php | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/lib/log.php b/lib/log.php index d38bb892..80e2ac54 100644 --- a/lib/log.php +++ b/lib/log.php @@ -5,15 +5,6 @@ $aStartTime = explode('.',microtime(true)); if (!isset($aStartTime[1])) $aStartTime[1] = '0'; - if (isset($_GET['email'])) - $sUserAgent = $_GET['email']; - elseif (isset($_SERVER['HTTP_REFERER'])) - $sUserAgent = $_SERVER['HTTP_REFERER']; - elseif (isset($_SERVER['HTTP_USER_AGENT'])) - $sUserAgent = $_SERVER['HTTP_USER_AGENT']; - else - $sUserAgent = ''; - $sOutputFormat = ''; if (isset($_GET['format'])) $sOutputFormat = $_GET['format']; @@ -32,7 +23,6 @@ $_SERVER['QUERY_STRING'], $sOutQuery, $sType, - $sUserAgent, $sOutputFormat ); @@ -72,11 +62,10 @@ if (CONST_Log_File) { - array_unshift($hLog, $sEndTime); - $hLog[] = $iNumResults; + $aOutdata = array($hLog[0], $sEndTime, $iNumResults, $hLog[4], $hLog[2]); $fLog = fopen(CONST_Log_File, 'a'); flock($fLog, LOCK_EX); - fputcsv($fLog, $hLog); + fputcsv($fLog, $aOutdata); fflush($fLog); flock($fLog, LOCK_UN); fclose($fLog); -- 2.39.5