From 94254643b28bda26fdc1566a1a18979e880ae1e0 Mon Sep 17 00:00:00 2001 From: Dave Greenberg Date: Fri, 3 Oct 2014 17:54:46 -0700 Subject: [PATCH] CRM-11342 - Fix for correct filtering of permissioned employees. ---------------------------------------- * CRM-11342: https://issues.civicrm.org/jira/browse/CRM-11342 --- CRM/Core/BAO/ActionSchedule.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; } } -- 2.25.1