From: Johan Vervloet Date: Thu, 17 Dec 2015 14:41:57 +0000 (+0100) Subject: Revert "CRM-14920 - labels from custom search: honor sort order." X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=4c78f49e211b6cac6761c2b1901fa672add7ca42;p=civicrm-core.git Revert "CRM-14920 - labels from custom search: honor sort order." This reverts commit 211c4cb1de75da6ea3cf9407505d0234827e969e. --- 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;