X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fsmssettings.php;h=ec2fcfd89e94cd6694eb88280f45121c6659f934;hb=998afe184489c7a0752265e76cd8073d6c13fe63;hp=d151ff45d6a7b61ed8e388df9ea442eb9d9d04eb;hpb=19b965d99188fde59cdd39b668df8951bc0f180c;p=quix0rs-gnu-social.git diff --git a/actions/smssettings.php b/actions/smssettings.php index d151ff45d6..ec2fcfd89e 100644 --- a/actions/smssettings.php +++ b/actions/smssettings.php @@ -120,7 +120,7 @@ class SmssettingsAction extends SettingsAction } else { $confirm = $this->getConfirmation(); if ($confirm) { - $carrier = Sms_carrier::staticGet($confirm->address_extra); + $carrier = Sms_carrier::getKV($confirm->address_extra); $this->element('p', 'form_unconfirmed', $confirm->address . ' (' . $carrier->name . ')'); $this->element('p', 'form_guide', @@ -299,7 +299,6 @@ class SmssettingsAction extends SettingsAction common_log_db_error($user, 'UPDATE', __FILE__); // TRANS: Server error thrown on database error updating SMS preferences. $this->serverError(_('Could not update user.')); - return; } $user->query('COMMIT'); @@ -363,10 +362,9 @@ class SmssettingsAction extends SettingsAction common_log_db_error($confirm, 'INSERT', __FILE__); // TRANS: Server error thrown on database error adding SMS confirmation code. $this->serverError(_('Could not insert confirmation code.')); - return; } - $carrier = Sms_carrier::staticGet($carrier_id); + $carrier = Sms_carrier::getKV($carrier_id); mail_confirm_sms($confirm->code, $user->nickname, @@ -411,7 +409,6 @@ class SmssettingsAction extends SettingsAction common_log_db_error($confirm, 'DELETE', __FILE__); // TRANS: Server error thrown on database error canceling SMS phone number confirmation. $this->serverError(_('Could not delete SMS confirmation.')); - return; } // TRANS: Message given after successfully canceling SMS phone number confirmation. @@ -447,12 +444,11 @@ class SmssettingsAction extends SettingsAction $user->carrier = null; $user->smsemail = null; - $result = $user->updateKeys($original); + $result = $user->updateWithKeys($original); if (!$result) { common_log_db_error($user, 'UPDATE', __FILE__); // TRANS: Server error thrown on database error removing a registered SMS phone number. $this->serverError(_('Could not update user.')); - return; } $user->query('COMMIT'); @@ -473,7 +469,7 @@ class SmssettingsAction extends SettingsAction { $user = common_current_user(); - $other = User::staticGet('sms', $sms); + $other = User::getKV('sms', $sms); if (!$other) { return false; @@ -560,7 +556,7 @@ class SmssettingsAction extends SettingsAction $user->incomingemail = null; - if (!$user->updateKeys($orig)) { + if (!$user->updateWithKeys($orig)) { common_log_db_error($user, 'UPDATE', __FILE__); // TRANS: Server error displayed when the user could not be updated in SMS settings. $this->serverError(_('Could not update user record.')); @@ -585,7 +581,7 @@ class SmssettingsAction extends SettingsAction $user->incomingemail = mail_new_incoming_address(); - if (!$user->updateKeys($orig)) { + if (!$user->updateWithKeys($orig)) { common_log_db_error($user, 'UPDATE', __FILE__); // TRANS: Server error displayed when the user could not be updated in SMS settings. $this->serverError(_('Could not update user record.'));