]> git.openstreetmap.org Git - nominatim.git/commitdiff
Merge remote-tracking branch 'upstream/master'
authorSarah Hoffmann <lonvia@denofr.de>
Fri, 27 May 2022 16:09:31 +0000 (18:09 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Fri, 27 May 2022 16:09:31 +0000 (18:09 +0200)
docs/admin/Setup-Nominatim-UI.md
lib-php/SearchDescription.php
lib-php/log.php

index 374a84e197ccf9032ab8e883e7f303ecdd138c25..7f0126603a80380cd826908b5c6a4cb6f78ac903 100644 (file)
@@ -163,22 +163,14 @@ directory like this:
 
   # If format-html is explicity requested, forward to the UI.
   RewriteCond %{QUERY_STRING} "format=html"
-  RewriteRule ^([^/]+).php ui/$1.html [R,END]
-  # Same but .php suffix is missing.
-  RewriteCond %{QUERY_STRING} "format=html"
-  RewriteRule ^([^/]+) ui/$1.html [R,END]
+  RewriteRule ^([^/]+)(.php)? ui/$1.html [R,END]
 
   # If no format parameter is there then forward anything
   # but /reverse and /lookup to the UI.
   RewriteCond %{QUERY_STRING} "!format="
   RewriteCond %{REQUEST_URI}  "!/lookup"
   RewriteCond %{REQUEST_URI}  "!/reverse"
-  RewriteRule ^([^/]+).php ui/$1.html [R,END]
-  # Same but .php suffix is missing.
-  RewriteCond %{QUERY_STRING} "!format="
-  RewriteCond %{REQUEST_URI}  "!/lookup"
-  RewriteCond %{REQUEST_URI}  "!/reverse"
-  RewriteRule ^([^/]+) ui/$1.html [R,END]
+  RewriteRule ^([^/]+)(.php)? ui/$1.html [R,END]
 </Directory>
 ```
 
index 65df58ef0850b120bbc4e5a1b7b8af19dfd9ef34..3f3beab1964dd2e2578c117bac663ce9baa5535c 100644 (file)
@@ -264,6 +264,8 @@ class SearchDescription
     {
         if (empty($this->aName)) {
             $this->bNameNeedsAddress = $bNeedsAddress;
+        } elseif ($bSearchable && count($this->aName) >= 2) {
+            $this->bNameNeedsAddress = false;
         } else {
             $this->bNameNeedsAddress &= $bNeedsAddress;
         }
index b6d7a1a9fca482139d1573f41823ae918a9f632f..1d567733938d5afdbf783442c75ac9c5ccf5cf08 100644 (file)
@@ -78,7 +78,7 @@ function logEnd(&$oDB, $hLog, $iNumResults)
 
     if (CONST_Log_DB) {
         $aEndTime = explode('.', $fEndTime);
-        if (!$aEndTime[1]) {
+        if (!isset($aEndTime[1])) {
             $aEndTime[1] = '0';
         }
         $sEndTime = date('Y-m-d H:i:s', $aEndTime[0]).'.'.$aEndTime[1];