summaryrefslogtreecommitdiff
path: root/plugins/TwitterBridge/twittersettings.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-03-05 03:14:40 +0000
committerZach Copley <zach@status.net>2010-03-05 03:14:40 +0000
commit6a377a4ba409083e05d16b163013f0f09c606170 (patch)
treeadc97101ea783c3c33f4cf916aed6fca4117c56f /plugins/TwitterBridge/twittersettings.php
parent029b8c90142e08b0ed44f0528ddea7d4dcc32980 (diff)
A better way to safely delete Foreign_links
Diffstat (limited to 'plugins/TwitterBridge/twittersettings.php')
-rw-r--r--plugins/TwitterBridge/twittersettings.php11
1 files changed, 1 insertions, 10 deletions
diff --git a/plugins/TwitterBridge/twittersettings.php b/plugins/TwitterBridge/twittersettings.php
index f22a059f7..631b29f52 100644
--- a/plugins/TwitterBridge/twittersettings.php
+++ b/plugins/TwitterBridge/twittersettings.php
@@ -250,16 +250,7 @@ class TwittersettingsAction extends ConnectSettingsAction
$user = common_current_user();
$flink = Foreign_link::getByUserID($user->id, TWITTER_SERVICE);
- $result = false;
-
- // Be extra careful to make sure we have a good flink
- // before deleting
- if (!empty($flink->user_id)
- && !empty($flink->foreign_id)
- && !empty($flink->service))
- {
- $result = $flink->delete();
- }
+ $result = $flink->safeDelete();
if (empty($result)) {
common_log_db_error($flink, 'DELETE', __FILE__);