This fixes the issue when you manually select a number of rows
from the custom search results. It does not work when you
want to create labels for all results.
----------------------------------------
* CRM-14920: Custom Searches do not honor user sort order
https://issues.civicrm.org/jira/browse/CRM-14920
// and it decides when to use distinct based on input criteria, which needs
// to be fixed and optimized.
- foreach ($allCids[$cacheKey] as $cid => $ignore) {
- $form->_contactIds[] = $cid;
- }
+ $form->_contactIds = array_unique($allCids[$cacheKey]);
}
}
elseif (CRM_Utils_Array::value('radio_ts', self::$_searchFormValues) == 'ts_sel') {
$contactIds = array();
while ($dao->fetch()) {
- $contactIds[$dao->contact_id] = $dao->contact_id;
+ $contactIds[] = $dao->contact_id;
}
return $contactIds;