From: Evan Prodromou Date: Sun, 20 Jul 2008 23:37:12 +0000 (-0400) Subject: fixup autosubscribe save X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=27d5118b6d94b733df38a0da38eebe074ed02eb7;p=quix0rs-gnu-social.git fixup autosubscribe save darcs-hash:20080720233712-84dde-dda5de6fec9d1d48f61139c1cce8a6e8aa2e0055.gz --- diff --git a/actions/profilesettings.php b/actions/profilesettings.php index 09b5b5abc3..b703c8b2b0 100644 --- a/actions/profilesettings.php +++ b/actions/profilesettings.php @@ -118,18 +118,19 @@ class ProfilesettingsAction extends SettingsAction { } } - # XOR + # XXX: XOR if ($user->autosubscribe ^ $autosubscribe) { + $original = clone($user); - $user->nickname = $nickname; + $user->autosubscribe = $autosubscribe; $result = $user->update($original); if ($result === FALSE) { common_log_db_error($user, 'UPDATE', __FILE__); - common_server_error(_('Couldn\'t update user.')); + common_server_error(_('Couldn\'t update user for autosubscribe.')); return; } }