summaryrefslogtreecommitdiff
path: root/plugins/TwitterBridge/twitter.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-05-19 10:10:55 -0700
committerBrion Vibber <brion@pobox.com>2010-05-19 10:10:55 -0700
commit74a89b1fc37067d91d31bd66922053361eb4e616 (patch)
tree3c3520402e6d8c1a407af5d42e6c49abff5b7dd1 /plugins/TwitterBridge/twitter.php
parent114df39822d7007f1b08b83b4e9a26202936e8c8 (diff)
Locale switch cleanup: use common_switch_locale() which is safer for updating gettext state. Also moved a few calls to reduce chance of hitting an exception before switching back.
Should help with problems where xmppdaemon would get stuck in wrong locale.
Diffstat (limited to 'plugins/TwitterBridge/twitter.php')
-rw-r--r--plugins/TwitterBridge/twitter.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/TwitterBridge/twitter.php b/plugins/TwitterBridge/twitter.php
index 21adc7a90..896eee2da 100644
--- a/plugins/TwitterBridge/twitter.php
+++ b/plugins/TwitterBridge/twitter.php
@@ -335,10 +335,10 @@ function remove_twitter_link($flink)
function mail_twitter_bridge_removed($user)
{
- common_init_locale($user->language);
-
$profile = $user->getProfile();
+ common_switch_locale($user->language);
+
$subject = sprintf(_m('Your Twitter bridge has been disabled.'));
$site_name = common_config('site', 'name');
@@ -354,7 +354,7 @@ function mail_twitter_bridge_removed($user)
common_local_url('twittersettings'),
common_config('site', 'name'));
- common_init_locale();
+ common_switch_locale();
return mail_to_user($user, $subject, $body);
}