From 55e6b6749adf85af0d576a4bb6c73022e564e39e Mon Sep 17 00:00:00 2001 From: Matthew Wire Date: Tue, 25 Jul 2017 22:02:10 +0100 Subject: [PATCH] Fix bad SQL query causing city lookup to fail --- api/v3/PostcodeAT/Get.php | 5 +++-- info.xml | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/api/v3/PostcodeAT/Get.php b/api/v3/PostcodeAT/Get.php index 62256f2..e0071da 100644 --- a/api/v3/PostcodeAT/Get.php +++ b/api/v3/PostcodeAT/Get.php @@ -77,11 +77,12 @@ function civicrm_api3_postcode_a_t_get($params) { } $selectFields = $validatedParams['return']; - $sql = "SELECT DISTINCT {$selectFields} FROM `civicrm_postcodeat` WHERE 1 {$where} LIMIT 0, 100"; + $sql = "SELECT DISTINCT {$selectFields} FROM `civicrm_postcodeat` WHERE 1 {$where}"; // For ortnam (City) we select gemnam38 (Politische Gemeinde) as well if ($selectFields == 'ortnam') { - $sql.= " UNION SELECT gemnam38 FROM `civicrm_postcodeat` WHERE 1 {$where} LIMIT 0, 100"; + $sql.= " UNION SELECT gemnam38 FROM `civicrm_postcodeat` WHERE 1 {$where}"; } + $sql .= " LIMIT 0, 100"; $dao = CRM_Core_DAO::executeQuery($sql, $values); $returnValues = array(); diff --git a/info.xml b/info.xml index 6a92ec9..8d5f1f8 100644 --- a/info.xml +++ b/info.xml @@ -10,11 +10,11 @@ mjw@mjwconsult.co.uk - https://github.com/mattwire/de.systopia.postcodeat + https://github.com/systopia/de.systopia.postcodeat http://www.gnu.org/licenses/agpl-3.0.html - 2017-07-20 - 1.0.beta1 + 2017-07-25 + 1.0.beta2 beta 4.6