From: mmikitka Date: Fri, 3 May 2013 04:26:46 +0000 (-0400) Subject: Load the api_type string value in getProviderInfo. Fixed a typo bug in the Clickatell... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=503fc58c222b0bd2de1371ba76c06495ed9d28c7;p=civicrm-core.git Load the api_type string value in getProviderInfo. Fixed a typo bug in the Clickatell and Twilio files. --- 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);