From 12b90f38b56c6cab7da9f76558eca69b4fd5bf8a Mon Sep 17 00:00:00 2001 From: Brian Shaughnessy Date: Tue, 3 Dec 2013 15:59:08 -0500 Subject: [PATCH] CRM-13812 additional cleanup as we no longer need to cycle through deleted contacts separately --- CRM/Activity/BAO/Activity.php | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/CRM/Activity/BAO/Activity.php b/CRM/Activity/BAO/Activity.php index 8a0aa88f36..d1b0ee3ede 100644 --- a/CRM/Activity/BAO/Activity.php +++ b/CRM/Activity/BAO/Activity.php @@ -871,33 +871,6 @@ ORDER BY fixed_sort_order } } - // add info on whether the related contacts are deleted (CRM-5673) - // FIXME: ideally this should be tied to ACLs - - // grab all the related contact ids - $cids = array(); - foreach ($values as $value) { - $cids[] = $value['source_contact_id']; - } - $cids = array_filter(array_unique($cids)); - - // see which of the cids are of deleted contacts - if ($cids) { - $sql = 'SELECT id FROM civicrm_contact WHERE id IN (' . implode(', ', $cids) . ') AND is_deleted = 1'; - $dao = CRM_Core_DAO::executeQuery($sql); - $dels = array(); - while ($dao->fetch()) { - $dels[] = $dao->id; - } - - // hide the deleted contacts - foreach ($values as & $value) { - if (in_array($value['source_contact_id'], $dels)) { - unset($value['source_contact_id'], $value['source_contact_name']); - } - } - } - return $values; } -- 2.25.1