From 86c838ac3d84b357ae9015c976340f25e2f1f2b5 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Tue, 9 Apr 2013 14:45:11 -0700 Subject: [PATCH] Don't show deleted contacts CRM-10012 --- CRM/Member/Page/Tab.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CRM/Member/Page/Tab.php b/CRM/Member/Page/Tab.php index d41eeee49a..cca6882886 100644 --- a/CRM/Member/Page/Tab.php +++ b/CRM/Member/Page/Tab.php @@ -152,7 +152,8 @@ class CRM_Member_Page_Tab extends CRM_Core_Page { SELECT COUNT(m.id) FROM civicrm_membership m LEFT JOIN civicrm_membership_status ms ON ms.id = m.status_id - WHERE m.owner_membership_id = {$dao->id} AND m.is_test = 0 AND ms.is_current_member = 1"; + LEFT JOIN civicrm_contact ct ON ct.id = m.contact_id + WHERE m.owner_membership_id = {$dao->id} AND m.is_test = 0 AND ms.is_current_member = 1 AND ct.is_deleted = 0"; $num_related = CRM_Core_DAO::singleValueQuery($query); $max_related = CRM_Utils_Array::value('max_related', $membership[$dao->id]); $membership[$dao->id]['related_count'] = ($max_related == '' ? -- 2.25.1