From: Johan Vervloet Date: Thu, 17 Dec 2015 14:40:10 +0000 (+0100) Subject: CRM-14920 One more fix for ZipCodeRange custom search. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=562f502dd691490238cd2b9d85c6532484e3e6a5;p=civicrm-core.git 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 --- 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,