From 4aedce6864eb27a0c37b3dcae22fee0aa16ae537 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 18 Jun 2008 23:32:12 -0400 Subject: do some commits darcs-hash:20080619033212-84dde-2f7227fe16c7015b03121424520ebd74d4b96762.gz --- actions/profilesettings.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'actions/profilesettings.php') diff --git a/actions/profilesettings.php b/actions/profilesettings.php index 44abb8e99..159dab18a 100644 --- a/actions/profilesettings.php +++ b/actions/profilesettings.php @@ -122,7 +122,9 @@ class ProfilesettingsAction extends SettingsAction { common_debug('Updating, nickname ="'.$user->nickname.'" and email ="'.$user->email.'"'); common_debug('Original, nickname ="'.$original->nickname.'" and email ="'.$original->email.'"'); - if (FALSE === $user->update($original)) { + $result = $user->update($original); + + if (!$result) { common_server_error(_t('Couldnt update user.')); return; } @@ -138,12 +140,16 @@ class ProfilesettingsAction extends SettingsAction { $profile->location = $location; $profile->profileurl = common_profile_url($nickname); - if (FALSE === $profile->update($orig_profile)) { + $result = $profile->update($orig_profile); + + if (!$result) { common_server_error(_t('Couldnt save profile.')); return; } common_broadcast_profile($profile); + + $user->query('COMMIT'); $this->show_form(_t('Settings saved.'), TRUE); } -- cgit v1.2.3-54-g00ecf