mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-12-18 02:21:55 +03:00
commit
a27a271034
@ -36,7 +36,7 @@ function logStart(&$oDB, $sType = '', $sQuery = '', $aLanguageList = array())
|
|||||||
$sUserAgent = $_SERVER['HTTP_USER_AGENT'];
|
$sUserAgent = $_SERVER['HTTP_USER_AGENT'];
|
||||||
else $sUserAgent = '';
|
else $sUserAgent = '';
|
||||||
$sSQL = 'insert into new_query_log (type,starttime,query,ipaddress,useragent,language,format,searchterm)';
|
$sSQL = 'insert into new_query_log (type,starttime,query,ipaddress,useragent,language,format,searchterm)';
|
||||||
$sSQL .= ' values ('.
|
$sSQL .= ' values (';
|
||||||
$sSQL .= join(',', $oDB->getDBQuotedList(array(
|
$sSQL .= join(',', $oDB->getDBQuotedList(array(
|
||||||
$sType,
|
$sType,
|
||||||
$hLog[0],
|
$hLog[0],
|
||||||
@ -48,7 +48,7 @@ function logStart(&$oDB, $sType = '', $sQuery = '', $aLanguageList = array())
|
|||||||
$hLog[3]
|
$hLog[3]
|
||||||
)));
|
)));
|
||||||
$sSQL .= ')';
|
$sSQL .= ')';
|
||||||
$oDB->query($sSQL);
|
$oDB->exec($sSQL);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $hLog;
|
return $hLog;
|
||||||
@ -67,7 +67,7 @@ function logEnd(&$oDB, $hLog, $iNumResults)
|
|||||||
$sSQL .= ' where starttime = '.$oDB->getDBQuoted($hLog[0]);
|
$sSQL .= ' where starttime = '.$oDB->getDBQuoted($hLog[0]);
|
||||||
$sSQL .= ' and ipaddress = '.$oDB->getDBQuoted($hLog[1]);
|
$sSQL .= ' and ipaddress = '.$oDB->getDBQuoted($hLog[1]);
|
||||||
$sSQL .= ' and query = '.$oDB->getDBQuoted($hLog[2]);
|
$sSQL .= ' and query = '.$oDB->getDBQuoted($hLog[2]);
|
||||||
$oDB->query($sSQL);
|
$oDB->exec($sSQL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CONST_Log_File) {
|
if (CONST_Log_File) {
|
||||||
|
Loading…
Reference in New Issue
Block a user