From: monishdeb Date: Wed, 29 Oct 2014 14:58:44 +0000 (+0530) Subject: CRM-15500 fix - Scheduled reminders: if 'Also include' and 'Choose recipients' is... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7a03c5d799b824a79874c4616d7c9e73e39fddfb;p=civicrm-core.git CRM-15500 fix - Scheduled reminders: if 'Also include' and 'Choose recipients' is selected, and no recipients are entered - reminder is sent to all contacts https://issues.civicrm.org/jira/browse/CRM-15500 --- diff --git a/CRM/Core/BAO/ActionSchedule.php b/CRM/Core/BAO/ActionSchedule.php index 9e8e284d25..45bd673f8d 100755 --- a/CRM/Core/BAO/ActionSchedule.php +++ b/CRM/Core/BAO/ActionSchedule.php @@ -1210,7 +1210,7 @@ LEFT JOIN {$reminderJoinClause} "; CRM_Core_DAO::executeQuery($query, array(1 => array($actionSchedule->id, 'Integer'))); - if ($limitTo == 0) { + if ($limitTo == 0 && (!empty($addGroup) || !empty($addWhere))) { $additionWhere = ' WHERE '; if ($actionSchedule->start_action_date) { $additionWhere = $whereClause . ' AND ';