diff --git a/.gitignore b/.gitignore
old mode 100644
new mode 100755
diff --git a/LICENSE.txt b/LICENSE.txt
old mode 100644
new mode 100755
diff --git a/README.md b/README.md
old mode 100644
new mode 100755
diff --git a/bbsms.civix.php b/bbsms.civix.php
old mode 100644
new mode 100755
diff --git a/bbsms.php b/bbsms.php
old mode 100644
new mode 100755
diff --git a/composer.json b/composer.json
index 8c96ae7..039e04f 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
{
- "name": "bb/bbsms",
- "description": "(BBSMS) BB civicrm sms extention",
- "version": "2.0.0",
+ "name": "bb/bb-sms",
+ "description": "BB SMS Delivery Gateway",
+ "version": "2.0.1",
"type": "civicrm-ext",
"homepage": "https://github.com/Bnei-Baruch/bbsms",
"license": "AGPL-3.0",
@@ -13,3 +13,4 @@
}
]
}
+
diff --git a/images/screenshot.png b/images/screenshot.png
old mode 100644
new mode 100755
diff --git a/info.xml b/info.xml
old mode 100644
new mode 100755
index f25fb1f..8882f91
--- a/info.xml
+++ b/info.xml
@@ -9,10 +9,10 @@
gshilin@gmail.com
2018-12-02
- 1.0
- alpha
+ 2.0.1
+ stable
4.7
- This is a new, undeveloped module
+
diff --git a/info_kabbalah_bbSMS.php b/info_kabbalah_bbSMS.php
old mode 100644
new mode 100755
index d1642a9..d768f8b
--- a/info_kabbalah_bbSMS.php
+++ b/info_kabbalah_bbSMS.php
@@ -50,8 +50,6 @@
class info_kabbalah_bbSMS extends CRM_SMS_Provider
{
- CONST MAX_SMS_CHAR = 459;
-
/**
* api type to use to send a message
* @var string
@@ -133,7 +131,6 @@ function __construct($provider = array(), $skipAuth = FALSE)
// initialize vars
$this->_apiType = CRM_Utils_Array::value('api_type', $provider, 'http');
$this->_providerInfo = $provider;
- CRM_Core_Error::debug_log_message("bbSMS: constructor");
/**
* Reuse the curl handle
@@ -196,7 +193,6 @@ function send($recipients, $header, $message, $jobID = NULL, $userID = NULL)
CRM_Core_Error::debug_log_message("bbSMS: send to " . var_export($recipients, true));
if ($this->_apiType == 'http') {
- CRM_Core_Error::debug_log_message("bbSMS: send http");
$url = $this->_providerInfo['api_url'];
$message_text = preg_replace( "/\r|\n/", "", $message); // remove line breaks
$xml = '';
@@ -216,16 +212,14 @@ function send($recipients, $header, $message, $jobID = NULL, $userID = NULL)
$xml .= ' ' . htmlspecialchars($this->_providerInfo['api_params']['sender']) . '' . PHP_EOL;
$xml .= ' ' . PHP_EOL;
$xml .= '' . PHP_EOL;
- CRM_Core_Error::debug_log_message("bbSMS: send xml: " . $xml);
$postData = urlencode($xml);
$response = $this->curl($url, $postData);
- CRM_Core_Error::debug_log_message("bbSMS: send curl: " . var_export($response, true));
if ($response['error']) {
$errorMessage = $response['error'];
CRM_Core_Session::setStatus(ts($errorMessage), ts('Sending SMS Error'), 'error');
// TODO: Should add a failed activity instead.
- CRM_Core_Error::debug_log_message($response . " - for one of: {$recipients}");
+ CRM_Core_Error::debug_log_message($response . " - for phone: {$header['To']}");
return false;
} else {
$this->createActivity(0, $message, $header, $jobID, $userID);
@@ -254,7 +248,6 @@ function curl($url, $postData)
// Send the data out over the wire
$response = curl_exec($this->_ch);
- CRM_Core_Error::debug_log_message("bbSMS: curl: " . var_export($response), true);
if (!$response) {
$errorMessage = 'Error: "' . curl_error($this->_ch) . '" - Code: ' . curl_errno($this->_ch);
@@ -266,11 +259,9 @@ function curl($url, $postData)
return $response;
}
- CRM_Core_Error::debug_log_message("bbSMS: curl before parsing ");
$xmlparser = xml_parser_create();
xml_parse_into_struct($xmlparser, $response, $values);
xml_parser_free($xmlparser);
- CRM_Core_Error::debug_log_message("bbSMS: curl after parsing " . var_export($values, true));
$result = array();
for ($i = 0; $i < count($values); $i++) {
$v = $values[$i];
@@ -280,7 +271,6 @@ function curl($url, $postData)
$result['description'] = $v['value'];
}
}
- CRM_Core_Error::debug_log_message("bbSMS: curl result " . var_export($result, true));
return $result;
}