@@ -71,7 +71,6 @@ public static function getMapping($id = NULL) {
71
71
/**
72
72
* Get all fields of the type Date
73
73
*/
74
-
75
74
public static function getDateFields () {
76
75
$ allFields = CRM_Core_BAO_CustomField::getFields ('' );
77
76
$ dateFields = array ('birth_date ' => ts ('Birth Date ' ));
@@ -489,7 +488,7 @@ public static function sendReminder($contactId, $to, $scheduleID, $from, $tokenP
489
488
foreach (array (
490
489
'text ' ,
491
490
'html ' ,
492
- 'sms_text '
491
+ 'sms_text ' ,
493
492
) as $ elem ) {
494
493
$ $ elem = $ smarty ->fetch ("string: {$ $ elem }" );
495
494
}
@@ -529,7 +528,7 @@ public static function sendReminder($contactId, $to, $scheduleID, $from, $tokenP
529
528
$ smsParams = array (
530
529
'To ' => $ phoneNumber ,
531
530
'provider_id ' => $ schedule ->sms_provider_id ,
532
- 'activity_subject ' => $ messageSubject
531
+ 'activity_subject ' => $ messageSubject,
533
532
);
534
533
$ activityTypeID = CRM_Core_OptionGroup::getValue ('activity_type ' ,
535
534
'SMS ' ,
@@ -701,16 +700,16 @@ public static function sendMailings($mappingID, $now) {
701
700
$ activityStatusID = FALSE ;
702
701
if ($ actionSchedule ->record_activity ) {
703
702
if ($ mapping ->entity == 'civicrm_membership ' ) {
704
- $ activityTypeID =
705
- CRM_Core_OptionGroup::getValue ('activity_type ' , 'Membership Renewal Reminder ' , 'name ' );
703
+ $ activityTypeID
704
+ = CRM_Core_OptionGroup::getValue ('activity_type ' , 'Membership Renewal Reminder ' , 'name ' );
706
705
}
707
706
else {
708
- $ activityTypeID =
709
- CRM_Core_OptionGroup::getValue ('activity_type ' , 'Reminder Sent ' , 'name ' );
707
+ $ activityTypeID
708
+ = CRM_Core_OptionGroup::getValue ('activity_type ' , 'Reminder Sent ' , 'name ' );
710
709
}
711
710
712
- $ activityStatusID =
713
- CRM_Core_OptionGroup::getValue ('activity_status ' , 'Completed ' , 'name ' );
711
+ $ activityStatusID
712
+ = CRM_Core_OptionGroup::getValue ('activity_status ' , 'Completed ' , 'name ' );
714
713
}
715
714
716
715
if ($ mapping ->entity == 'civicrm_activity ' ) {
@@ -753,7 +752,7 @@ public static function sendMailings($mappingID, $now) {
753
752
'fee_amount ' ,
754
753
'contact_email ' ,
755
754
'contact_phone ' ,
756
- 'balance '
755
+ 'balance ' ,
757
756
);
758
757
$ extraSelect = ', ov.label as event_type, ev.title, ev.id as event_id, ev.start_date, ev.end_date, ev.summary, ev.description, address.street_address, address.city, address.state_province_id, address.postal_code, email.email as contact_email, phone.phone as contact_phone ' ;
759
758
@@ -880,8 +879,8 @@ public static function sendMailings($mappingID, $now) {
880
879
if ($ toEmail || !(empty ($ toPhoneNumber ) or $ toDoNotSms )) {
881
880
$ to ['email ' ] = $ toEmail ;
882
881
$ to ['phone ' ] = $ toPhoneNumber ;
883
- $ result =
884
- CRM_Core_BAO_ActionSchedule::sendReminder (
882
+ $ result
883
+ = CRM_Core_BAO_ActionSchedule::sendReminder (
885
884
$ dao ->contactID ,
886
885
$ to ,
887
886
$ actionSchedule ->id ,
@@ -913,8 +912,7 @@ public static function sendMailings($mappingID, $now) {
913
912
$ activityParams = array (
914
913
'subject ' => $ actionSchedule ->title ,
915
914
'details ' => $ actionSchedule ->body_html ,
916
- 'source_contact_id ' =>
917
- $ session ->get ('userID ' ) ? $ session ->get ('userID ' ) : $ dao ->contactID ,
915
+ 'source_contact_id ' => $ session ->get ('userID ' ) ? $ session ->get ('userID ' ) : $ dao ->contactID ,
918
916
'target_contact_id ' => $ dao ->contactID ,
919
917
'activity_date_time ' => date ('YmdHis ' ),
920
918
'status_id ' => $ activityStatusID ,
@@ -1333,9 +1331,10 @@ public static function buildRecipientContacts($mappingID, $now, $params = array(
1333
1331
$ valsqlInsertValues = CRM_Core_DAO::executeQuery ($ sqlInsertValues , array (
1334
1332
1 => array (
1335
1333
$ actionSchedule ->id ,
1336
- 'Integer '
1337
- )
1338
- ));
1334
+ 'Integer ' ,
1335
+ ),
1336
+ )
1337
+ );
1339
1338
1340
1339
$ arrValues = array ();
1341
1340
while ($ valsqlInsertValues ->fetch ()) {
0 commit comments