Details
Description
As http://issues.civicrm.org/jira/browse/CRM-12288 has been put back to 4.4 as it requires changed to activity types and country code etc, I'd like to suggest a couple of simple bugfixes for 4.3, as these do not effect upgrades etc:
https://github.com/ThomWilhelm/civicrm-core/commit/9f1ee5f805f51e4e21177573f6ac2891ac457670
This ensures SMS messages are only send to mobile numbers:
CRM/Activity/BAO/Activity.php
- $smsParams['To'] = $values['phone'];
+ // Only send if the phone is of type mobile
+ if($values['phone_type_id'] == 2) { + $smsParams['To'] = $values['phone']; + }else
{ + $smsParams['To'] = ''; + }
This ensures that when you send a Mass SMS, if 1 SMS fails it will not remove the shared Outbound SMS activity:
tools/extensions/org.civicrm.sms.clickatell/org_civicrm_sms_clickatell.php
- // delete any parent activity & throw error
- if (CRM_Utils_Array::value('parent_activity_id', $header)) { - $params = array('id' => $header['parent_activity_id']); - CRM_Activity_BAO_Activity::deleteActivity($params); - }
- return PEAR::raiseError($response['data']);
+ // TODO: Should add a failed activity instead.
+
+ CRM_Core_Error::debug_log_message($response['data']);
+ return;