From 3cf763475ffe3b5b5d65955a7128bd77aebd69de Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Wed, 25 Nov 2020 16:11:32 +0100 Subject: [PATCH] do not use artificial housenumbers as names If they are artificial they cannot have a search_name entry. --- lib/SearchDescription.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/SearchDescription.php b/lib/SearchDescription.php index c339b108..d8c541db 100644 --- a/lib/SearchDescription.php +++ b/lib/SearchDescription.php @@ -249,7 +249,10 @@ class SearchDescription $aNewSearches[] = $oSearch; // Housenumbers may appear in the name when the place has its own // address terms. - if (($this->iNamePhrase >= 0 || empty($this->aName)) && empty($this->aAddress)) { + if ($oSearchTerm->iId !== null + && ($this->iNamePhrase >= 0 || empty($this->aName)) + && empty($this->aAddress) + ) { $oSearch = clone $this; $oSearch->iSearchRank++; $oSearch->aAddress = $this->aName; -- 2.45.2