From 5029101048109f3cc6789483dc9d5d8405546059 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Fri, 6 Oct 2017 21:36:28 +0200 Subject: [PATCH] further restrict use of partial terms in names --- lib/Geocode.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Geocode.php b/lib/Geocode.php index d221e672..f282e265 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -859,7 +859,8 @@ class Geocode } } - if (!sizeof($aCurrentSearch['aName']) || $aCurrentSearch['iNamePhrase'] == $iPhrase) { + if ((!$aCurrentSearch['sPostcode'] && !$aSearch['aAddress'] && !$aSearch['aAddressNonSearch']) + && (!sizeof($aCurrentSearch['aName']) || $aCurrentSearch['iNamePhrase'] == $iPhrase)) { $aSearch = $aCurrentSearch; $aSearch['iSearchRank'] += 1; if (!sizeof($aCurrentSearch['aName'])) $aSearch['iSearchRank'] += 1;