From 4c78f49e211b6cac6761c2b1901fa672add7ca42 Mon Sep 17 00:00:00 2001 From: Johan Vervloet Date: Thu, 17 Dec 2015 15:41:57 +0100 Subject: [PATCH] Revert "CRM-14920 - labels from custom search: honor sort order." This reverts commit 211c4cb1de75da6ea3cf9407505d0234827e969e. --- CRM/Contact/Form/Task.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/Form/Task.php b/CRM/Contact/Form/Task.php index 731ab2ffc7..9e0ab17f62 100644 --- a/CRM/Contact/Form/Task.php +++ b/CRM/Contact/Form/Task.php @@ -190,7 +190,9 @@ class CRM_Contact_Form_Task extends CRM_Core_Form { // and it decides when to use distinct based on input criteria, which needs // to be fixed and optimized. - $form->_contactIds = array_unique($allCids[$cacheKey]); + foreach ($allCids[$cacheKey] as $cid => $ignore) { + $form->_contactIds[] = $cid; + } } } elseif (CRM_Utils_Array::value('radio_ts', self::$_searchFormValues) == 'ts_sel') { @@ -311,7 +313,7 @@ class CRM_Contact_Form_Task extends CRM_Core_Form { $contactIds = array(); while ($dao->fetch()) { - $contactIds[] = $dao->contact_id; + $contactIds[$dao->contact_id] = $dao->contact_id; } return $contactIds; -- 2.25.1