From 503fc58c222b0bd2de1371ba76c06495ed9d28c7 Mon Sep 17 00:00:00 2001 From: mmikitka Date: Fri, 3 May 2013 00:26:46 -0400 Subject: [PATCH] Load the api_type string value in getProviderInfo. Fixed a typo bug in the Clickatell and Twilio files. --- CRM/SMS/BAO/Provider.php | 5 +++++ .../org_civicrm_sms_clickatell.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CRM/SMS/BAO/Provider.php b/CRM/SMS/BAO/Provider.php index 18466e40b7..766a86e202 100644 --- a/CRM/SMS/BAO/Provider.php +++ b/CRM/SMS/BAO/Provider.php @@ -127,6 +127,11 @@ class CRM_SMS_BAO_Provider extends CRM_SMS_DAO_Provider { } } $providerInfo[$providerID]['api_params'] = $inputVals; + + // Replace the api_type ID with the string value + $apiTypes = CRM_Core_OptionGroup::values('sms_api_type'); + $apiTypeId = $providerInfo[$providerID]['api_type']; + $providerInfo[$providerID]['api_type'] = CRM_Utils_Array::value($apiTypeId, $apiTypes, $apiTypeId); } } diff --git a/tools/extensions/org.civicrm.sms.clickatell/org_civicrm_sms_clickatell.php b/tools/extensions/org.civicrm.sms.clickatell/org_civicrm_sms_clickatell.php index 9330d372e5..66de418cc4 100644 --- a/tools/extensions/org.civicrm.sms.clickatell/org_civicrm_sms_clickatell.php +++ b/tools/extensions/org.civicrm.sms.clickatell/org_civicrm_sms_clickatell.php @@ -223,7 +223,7 @@ class org_civicrm_sms_clickatell extends CRM_SMS_Provider { * @access public */ function send($recipients, $header, $message, $jobID = NULL) { - if ($this->_apiType = 'http') { + if ($this->_apiType == 'http') { $postDataArray = array( ); $url = $this->formURLPostData("/http/sendmsg", $postDataArray); -- 2.25.1