X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fimsettings.php;h=90a4fd8074c077e4948984753f94482a33e96ecf;hb=31b5ae1523c4f64159f00b32683912da1a9fb474;hp=a5e9be307ea5a9cb027a32d4e227329537a1946c;hpb=db2d79cd31f6cdf4d7f45b2ef610f3fb40df564d;p=quix0rs-gnu-social.git diff --git a/actions/imsettings.php b/actions/imsettings.php index a5e9be307e..90a4fd8074 100644 --- a/actions/imsettings.php +++ b/actions/imsettings.php @@ -64,7 +64,9 @@ class ImsettingsAction extends SettingsAction { common_element_start('p'); common_element('span', 'address unconfirmed', $confirm->address); common_element('span', 'input_instructions', - _t('Current confirmed Jabber/GTalk address.')); + _t('Awaiting confirmation on this address. Check your ' . + 'Jabber/GTalk account for a message with further ' . + 'instructions.')); common_hidden('jabber', $confirm->address); common_element_end('p'); common_submit('cancel', _t('Cancel')); @@ -79,9 +81,11 @@ class ImsettingsAction extends SettingsAction { common_element('h2', NULL, _t('Preferences')); common_checkbox('jabbernotify', - _t('Send me notices through Jabber/GTalk.')); + _t('Send me notices through Jabber/GTalk.'), + $user->jabbernotify); common_checkbox('updatefrompresence', - _t('Post a notice when my Jabber/GTalk status changes.')); + _t('Post a notice when my Jabber/GTalk status changes.'), + $user->updatefrompresence); common_submit('save', _t('Save')); common_element_end('form'); @@ -146,6 +150,8 @@ class ImsettingsAction extends SettingsAction { function add_address() { + $user = common_current_user(); + $jabber = $this->trimmed('jabber'); # Some validation @@ -189,7 +195,7 @@ class ImsettingsAction extends SettingsAction { # XXX: optionally queue for offline sending if (!jabber_is_subscribed($jabber)) { - jabber_special_presence('subscribe', $address); + jabber_special_presence('subscribe', $jabber); } else { jabber_confirm_address($confirm->code, $user->nickname, @@ -239,9 +245,10 @@ class ImsettingsAction extends SettingsAction { } $user->query('BEGIN'); + $original = clone($user); $user->jabber = NULL; $result = $user->updateKeys($original); - if ($result === FALSE) { + if (!$result) { common_log_db_error($user, 'UPDATE', __FILE__); common_server_error(_t('Couldnt update user.')); return;