CRM-15500 fix - Scheduled reminders: if 'Also include' and 'Choose recipients' is...
authormonishdeb <monish.deb@webaccessglobal.com>
Wed, 29 Oct 2014 14:58:44 +0000 (20:28 +0530)
committermonishdeb <monish.deb@webaccessglobal.com>
Wed, 29 Oct 2014 14:58:44 +0000 (20:28 +0530)
https://issues.civicrm.org/jira/browse/CRM-15500

CRM/Core/BAO/ActionSchedule.php

index 9e8e284d257c8c0e01b062c98dd069f8af01c440..45bd673f8d605746f1e7d694431e899405e53575 100755 (executable)
@@ -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 ';