]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/log.php
remove distinct, causes nearest feature results to be badly reordered
[nominatim.git] / lib / log.php
index 8b5f00fde03086cf01872d8b52c9b78c3ea9f95f..e3126c0ebdf3a3532179f46191035e78297b19e6 100644 (file)
                        $oDB->query($sSQL);
                }
 
+               if (CONST_Log_File && CONST_Log_File_ReverseLog != '')
+               {
                 if ($sType == 'reverse')
                 {
                         $aStartTime = explode('.',$hLog[0]);
-                        file_put_contents('/data/mapquest/opentile_http/logs/nominatimreverse',
+                        file_put_contents(CONST_Log_File_ReverseLog,
                                 $aStartTime[0].','.$aStartTime[1].','.
                                 php_uname('n').','.
                                 '"'.addslashes(isset($_SERVER['HTTP_REFERER'])?$_SERVER['HTTP_REFERER']:'').'",'.
@@ -41,7 +43,7 @@
                                 '"'.addslashes($_GET['format']).'"'."\n",
                         FILE_APPEND);
                 }
-
+               }
 
                return $hLog;
        }
                        $oDB->query($sSQL);
                }
 
+               if (CONST_Log_File && CONST_Log_File_SearchLog != '')
+               {
                 $aStartTime = explode('.',$hLog[0]);
-                file_put_contents('/data/mapquest/opentile_http/logs/nominatimsearch',
+                file_put_contents(CONST_Log_File_SearchLog,
                                 $aStartTime[0].','.$aStartTime[1].','.
                                 php_uname('n').','.
                                 '"'.addslashes(isset($_SERVER['HTTP_REFERER'])?$_SERVER['HTTP_REFERER']:'').'",'.
@@ -78,5 +82,6 @@
                                 '"'.addslashes($_GET['format']).'",'.
                                 $iNumResults."\n",
                         FILE_APPEND);
+               }
 
        }