diff options
author | Zach Copley <zach@controlyourself.ca> | 2008-09-24 02:04:55 -0400 |
---|---|---|
committer | Zach Copley <zach@controlyourself.ca> | 2008-09-24 02:04:55 -0400 |
commit | 845db5ec168e26759c79de4f8216d1b54f7c0d8a (patch) | |
tree | 63114ad0c796758e3a897660f719b35868f8cac5 /actions/twittersettings.php | |
parent | e8b6e394dc0a087538af6cddd16ebc57cfa4c9cd (diff) |
Twitter bridge - Was using the wrong idiom to update foreign_link
objs, which was causing UI inconsistencies. Fixed.
darcs-hash:20080924060455-7b5ce-71ac4bb3a80ca44e6ae758d2287d50c918d1d908.gz
Diffstat (limited to 'actions/twittersettings.php')
-rw-r--r-- | actions/twittersettings.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/actions/twittersettings.php b/actions/twittersettings.php index d8eb7aba0..d37c042ac 100644 --- a/actions/twittersettings.php +++ b/actions/twittersettings.php @@ -238,6 +238,10 @@ class TwittersettingsAction extends SettingsAction { return; } + $flink->query('BEGIN'); + + $original = clone($flink); + if ($noticesync) { if ($replysync) { $flink->noticesync = 3; @@ -250,14 +254,17 @@ class TwittersettingsAction extends SettingsAction { $flink->friendsync = ($friendsync) ? 2 : 0; // $flink->profilesync = 0; // XXX: leave as default? - $result = $flink->update(); - if (!$result) { + $result = $flink->update($original); + + if ($result === FALSE) { common_log_db_error($flink, 'UPDATE', __FILE__); $this->show_form(_('Couldn\'t save Twitter preferences.')); return; } + $flink->query('COMMIT'); + $this->show_form(_('Twitter preferences saved.')); return; |