Load the api_type string value in getProviderInfo. Fixed a typo bug in the Clickatell...
authormmikitka <matt@mikitka.net>
Fri, 3 May 2013 04:26:46 +0000 (00:26 -0400)
committermmikitka <matt@mikitka.net>
Fri, 3 May 2013 04:26:46 +0000 (00:26 -0400)
CRM/SMS/BAO/Provider.php
tools/extensions/org.civicrm.sms.clickatell/org_civicrm_sms_clickatell.php

index 18466e40b7eebabe28dd3b4fd3a73af95a2599f5..766a86e2029e2dd22e259edec54e31cc1cb4032e 100644 (file)
@@ -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);
       }
     }
 
index 9330d372e57d9d22b6855bd7f586b4ba3fa8e0e1..66de418cc43eadc160709ba490512834f209aa20 100644 (file)
@@ -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);