X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/717f9b07af279e6ce622924d45f0904b7b8bda41..356724fb8b8d34ba92b5161dec91e7afb18ab99e:/lib/log.php 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); }