From: colemanw Date: Sat, 14 Nov 2015 00:05:22 +0000 (-0500) Subject: Merge pull request #7205 from zarandras/master X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b4e76f97630ac6fb3402bbf8fab8422c688a27b1;p=civicrm-core.git Merge pull request #7205 from zarandras/master CRM-17560 - Sql join type fix for civictm_activity_contact --- b4e76f97630ac6fb3402bbf8fab8422c688a27b1 diff --cc CRM/Activity/BAO/Query.php index 26226e972a,2c817a2d90..adfd8fb490 --- a/CRM/Activity/BAO/Query.php +++ b/CRM/Activity/BAO/Query.php @@@ -351,14 -351,12 +351,14 @@@ class CRM_Activity_BAO_Query //from civicrm_activity_target or civicrm_activity_assignment. //as component specific activities does not have entry in //activity target table so lets consider civicrm_activity_assignment. - $from .= " INNER JOIN civicrm_activity_contact + $from .= " $side JOIN civicrm_activity_contact ON ( civicrm_activity_contact.contact_id = contact_a.id ) "; - $from .= " INNER JOIN civicrm_activity + $from .= " $side JOIN civicrm_activity ON ( civicrm_activity.id = civicrm_activity_contact.activity_id AND civicrm_activity.is_deleted = 0 AND civicrm_activity.is_current_revision = 1 )"; - + // Do not show deleted contact's activity + $from .= " INNER JOIN civicrm_contact + ON ( civicrm_activity_contact.contact_id = civicrm_contact.id and civicrm_contact.is_deleted != 1 )"; break; case 'activity_status':