]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/smssettings.php
be a little more liberal for sites that accidentally put whitespace before the xml...
[quix0rs-gnu-social.git] / actions / smssettings.php
index e85852606f20a0c4a82e699164b84dd3c6301574..844fb6160b3e94b560d6f8f3841a20bd41d390da 100644 (file)
@@ -56,8 +56,8 @@ class SmssettingsAction extends EmailsettingsAction {
                                common_element('span', 'address unconfirmed', $confirm->address . ' (' . $carrier->name . ')');
                                common_element('span', 'input_instructions',
                                                           _('Awaiting confirmation on this phone number.'));
-                               common_hidden('sms', $user->sms);
-                               common_hidden('carrier', $user->carrier);
+                               common_hidden('sms', $confirm->address);
+                               common_hidden('carrier', $confirm->address_extra);
                                common_element_end('p');
                                common_submit('cancel', _('Cancel'));
                                common_input('code', _('Confirmation code'), NULL,
@@ -138,7 +138,7 @@ class SmssettingsAction extends EmailsettingsAction {
 
        function save_preferences() {
 
-               $smsnotify = $this->boolean('emailpost');
+               $smsnotify = $this->boolean('smsnotify');
                
                $user = common_current_user();
 
@@ -229,8 +229,8 @@ class SmssettingsAction extends EmailsettingsAction {
                        $this->show_form(_('No pending confirmation to cancel.'));
                        return;
                }
-               if ($confirm->address != $sms || $confirm->address_extra != $carrier) {
-                       $this->show_form(_('That is the wrong IM address.'));
+               if ($confirm->address != $sms) {
+                       $this->show_form(_('That is the wrong confirmation number.'));
                        return;
                }
 
@@ -262,6 +262,7 @@ class SmssettingsAction extends EmailsettingsAction {
                $original = clone($user);
                $user->sms = NULL;
                $user->carrier = NULL;          
+               $user->smsemail = NULL;         
                $result = $user->updateKeys($original);
                if (!$result) {
                        common_log_db_error($user, 'UPDATE', __FILE__);
@@ -317,6 +318,6 @@ class SmssettingsAction extends EmailsettingsAction {
                }
                
                common_redirect(common_local_url('confirmaddress', 
-                                                                                array('code' => $this->code)));
+                                                                                array('code' => $code)));
        }
 }