Merge pull request #7205 from zarandras/master
authorcolemanw <coleman@civicrm.org>
Sat, 14 Nov 2015 00:05:22 +0000 (19:05 -0500)
committercolemanw <coleman@civicrm.org>
Sat, 14 Nov 2015 00:05:22 +0000 (19:05 -0500)
CRM-17560 - Sql join type fix for civictm_activity_contact

1  2 
CRM/Activity/BAO/Query.php

index 26226e972a70536c67363bfa3f7ad8f923c8c6da,2c817a2d9072becb85de62ddfe6b66e3b0467ec2..adfd8fb490fde2431eefbcbd457b38832829a33c
@@@ -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':