From: Sarah Hoffmann Date: Wed, 27 Mar 2013 21:22:57 +0000 (+0100) Subject: tweak log output X-Git-Tag: deploy~631 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/7babfe4759dbb4d651f91629f7cb365dcb4649d3?ds=sidebyside tweak log output --- diff --git a/lib/log.php b/lib/log.php index d81ef46d..8022376d 100644 --- a/lib/log.php +++ b/lib/log.php @@ -17,9 +17,13 @@ if (CONST_Log_DB) { + if (isset($_GET['email'])) + $sUserAgent = $_GET['email']; + else + $sUserAgent = $_SERVER['HTTP_USER_AGENT']; $sSQL = 'insert into new_query_log (type,starttime,query,ipaddress,useragent,language,format,searchterm)'; $sSQL .= ' values ('.getDBQuoted($sType).','.getDBQuoted($hLog[0]).','.getDBQuoted($hLog[2]); - $sSQL .= ','.getDBQuoted($hLog[1]).','.getDBQuoted($_SERVER['HTTP_USER_AGENT']).','.getDBQuoted(join(',',$aLanguageList)).','.getDBQuoted($_GET['format']).','.getDBQuoted($hLog[3]).')'; + $sSQL .= ','.getDBQuoted($hLog[1]).','.getDBQuoted($sUserAgent).','.getDBQuoted(join(',',$aLanguageList)).','.getDBQuoted($sOutputFormat).','.getDBQuoted($hLog[3]).')'; $oDB->query($sSQL); }