From: Dave Greenberg Date: Sat, 4 Oct 2014 00:54:46 +0000 (-0700) Subject: CRM-11342 - Fix for correct filtering of permissioned employees. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=94254643b28bda26fdc1566a1a18979e880ae1e0;p=civicrm-core.git CRM-11342 - Fix for correct filtering of permissioned employees. ---------------------------------------- * CRM-11342: https://issues.civicrm.org/jira/browse/CRM-11342 --- diff --git a/CRM/Core/BAO/ActionSchedule.php b/CRM/Core/BAO/ActionSchedule.php index b2f93dfede..03b5c15991 100755 --- a/CRM/Core/BAO/ActionSchedule.php +++ b/CRM/Core/BAO/ActionSchedule.php @@ -1269,7 +1269,7 @@ GROUP BY c.id {$fromClause} {$joinClause} INNER JOIN {$reminderJoinClause} -{$whereClause} {$limitWhereClause} AND {$repeatEventClause} +{$whereClause} {$limitWhereClause} AND {$repeatEventClause} {$notINClause} {$groupByClause} {$havingClause}"; @@ -1343,10 +1343,10 @@ WHERE m.owner_membership_id IS NOT NULL AND $excludeIds = array(); $dao = CRM_Core_DAO::executeQuery($query, array()); while ($dao->fetch()) { - if ($dao->slave_contact == $dao->contact_id_a && $dao->is_permission_b_a == 0) { + if ($dao->slave_contact == $dao->contact_id_a && $dao->is_permission_a_b == 0) { $excludeIds[] = $dao->slave_contact; } - elseif ($dao->slave_contact == $dao->contact_id_b && $dao->is_permission_a_b == 0) { + elseif ($dao->slave_contact == $dao->contact_id_b && $dao->is_permission_b_a == 0) { $excludeIds[] = $dao->slave_contact; } }