Commit 80bb85a3 authored by Sherif Adigun's avatar Sherif Adigun
Browse files

corrected coding errors

parent 18a04829
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@ function send_sms_admin(){
    '#type' => 'textfield',
    '#title' => t('SMS website base url'),
    '#default_value' => variable_get('sms_base_url', ''),
    '#description' => t("The base url of the SMS website. (everything before the '?'). If you need explanation, see the README file included in this module."),
    '#description' => t('The base url of the SMS website. (everything before the "?"). If you need explanation, see the README file included in this module.'),
    '#required' => TRUE,
  );
  
@@ -17,13 +17,13 @@ function send_sms_admin(){
    '#type' => 'textfield',
    '#title' => t('SMS website username label'),
    '#default_value' => variable_get('username_label', 'username'),
    '#description' => t("The username label as required by the SMS website"),
    '#description' => t('The username label as required by the SMS website'),
  );
  $form['theusername'] = array(
    '#type' => 'textfield',
    '#title' => t('SMS website username value'),
    '#default_value' => variable_get('theusername', ''),
    '#description' => t("The username value as required by the SMS website"),
    '#description' => t('The username value as required by the SMS website'),
    '#required' => TRUE,
  );
  
@@ -31,13 +31,13 @@ function send_sms_admin(){
    '#type' => 'textfield',
    '#title' => t('Password Label'),
    '#default_value' => variable_get('sms_password_label', 'password'),
    '#description' => t("The password label as required by the SMS website.")
    '#description' => t('The password label as required by the SMS website.')
  );
  $form['thepassword'] = array(
    '#type' => 'textfield',
    '#title' => t('Password Value'),
    '#default_value' => variable_get('thepassword', ''),
    '#description' => t("The password as required by the SMS website."),
    '#description' => t('The password as required by the SMS website.'),
    '#required' => TRUE,
  );
  
@@ -45,25 +45,25 @@ function send_sms_admin(){
    '#type' => 'textfield',
    '#title' => t('Message Label'),
    '#default_value' => variable_get('sms_message_label', 'message'),
    '#description' => t("The message label as required by the SMS website.")
    '#description' => t('The message label as required by the SMS website.')
  );
  $form['sms_sender_label'] = array(
    '#type' => 'textfield',
    '#title' => t('Sender Label'),
    '#default_value' => variable_get('sms_sender_label', 'sender'),
    '#description' => t("The sender label as required by the SMS website.")
    '#description' => t('The sender label as required by the SMS website.')
  );
  $form['sms_recipient_label'] = array(
    '#type' => 'textfield',
    '#title' => t('Recipient Label'),
    '#default_value' => variable_get('sms_recipient_label', 'recipient'),
    '#description' => t("The recipient label as required by the SMS website."),
    '#description' => t('The recipient label as required by the SMS website.'),
  );
  $form['show_info'] = array(
    '#type' => 'checkbox',
    '#title' => t('Show message information'),
    '#default_value' => variable_get('show_info', ''),
    '#description' => t("Enable this to show if the message has been sent or error is thrown. You should disable this option once everything is working fine")
    '#description' => t('Enable this to show if the message has been sent or error is thrown. You should disable this option once everything is working fine')
  );

  return system_settings_form($form);
+4 −4
Original line number Diff line number Diff line
name = Send SMS action
description = A simple module to send SMS through rules. Developed by Adigun Sherif on a Sunday evening :-)
description = A simple module to send SMS through rules

core = 7.x
package = rules
package = Rules
configure = admin/config/user-interface/send-sms


dependencies[] = rules:rules
 No newline at end of file
version = 7.1.0
 No newline at end of file
+2 −1
Original line number Diff line number Diff line
@@ -46,7 +46,8 @@ function send_sms_rules_action_send_sms($thebody, $thesender, $thenumber) {
	$sms_base_url = variable_get('sms_base_url', '');
	
	//encode the text field for the message 
	$themessage = urlencode($thebody);
	//$themessage = rawurlencode($thebody);
	$themessage = $thebody;
	
	//use http_build_query
	$parameters = array(