From 562f502dd691490238cd2b9d85c6532484e3e6a5 Mon Sep 17 00:00:00 2001 From: Johan Vervloet Date: Thu, 17 Dec 2015 15:40:10 +0100 Subject: [PATCH] CRM-14920 One more fix for ZipCodeRange custom search. ---------------------------------------- * CRM-14920: Custom Searches do not honor user sort order https://issues.civicrm.org/jira/browse/CRM-14920 --- CRM/Contact/Form/Search/Custom/PostalMailing.php | 2 +- CRM/Contact/Form/Search/Custom/ZipCodeRange.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/Form/Search/Custom/PostalMailing.php b/CRM/Contact/Form/Search/Custom/PostalMailing.php index d77ac6e077..d36f66062b 100644 --- a/CRM/Contact/Form/Search/Custom/PostalMailing.php +++ b/CRM/Contact/Form/Search/Custom/PostalMailing.php @@ -103,7 +103,7 @@ class CRM_Contact_Form_Search_Custom_PostalMailing extends CRM_Contact_Form_Sear ) { if ($justIDs) { $selectClause = "contact_a.id as contact_id"; - //$sort = 'contact_a.id'; + // Don't change sort order when $justIDs is TRUE, see CRM-14920. } else { // YOU NEED to select contact_a.id as contact_id, if you want to be able diff --git a/CRM/Contact/Form/Search/Custom/ZipCodeRange.php b/CRM/Contact/Form/Search/Custom/ZipCodeRange.php index d6f0fb3e49..40d59fca71 100644 --- a/CRM/Contact/Form/Search/Custom/ZipCodeRange.php +++ b/CRM/Contact/Form/Search/Custom/ZipCodeRange.php @@ -119,7 +119,7 @@ class CRM_Contact_Form_Search_Custom_ZipCodeRange extends CRM_Contact_Form_Searc ) { if ($justIDs) { $selectClause = "contact_a.id as contact_id"; - $sort = "contact_a.id"; + // Don't change sort order when $justIDs is TRUE, see CRM-14920. } else { // We select contact_a.id twice. Once as contact_a.id, -- 2.25.1