summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-05-25 11:36:42 -0700
committerBrion Vibber <brion@pobox.com>2010-05-25 11:36:42 -0700
commitf98609204fb9b5966b9e4c9e4bf8bf605656c31c (patch)
tree8cc16bb846e31670ce64adb3574f67c54818dc16 /plugins
parent09dab2ce5ae819c73d7984822d418c43f1fba223 (diff)
Backing out locale switch change to see if this affects our mystery memory leak.
Revert "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." This reverts commit 74a89b1fc37067d91d31bd66922053361eb4e616.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Facebook/facebookutil.php6
-rw-r--r--plugins/TwitterBridge/twitter.php6
2 files changed, 6 insertions, 6 deletions
diff --git a/plugins/Facebook/facebookutil.php b/plugins/Facebook/facebookutil.php
index c7b0f02c3..9c35276b7 100644
--- a/plugins/Facebook/facebookutil.php
+++ b/plugins/Facebook/facebookutil.php
@@ -461,12 +461,12 @@ function remove_facebook_app($flink)
function mail_facebook_app_removed($user)
{
+ common_init_locale($user->language);
+
$profile = $user->getProfile();
$site_name = common_config('site', 'name');
- common_switch_locale($user->language);
-
$subject = sprintf(
_m('Your %1$s Facebook application access has been disabled.',
$site_name));
@@ -480,7 +480,7 @@ function mail_facebook_app_removed($user)
"re-installing the %2\$s Facebook application.\n\nRegards,\n\n%2\$s"),
$user->nickname, $site_name);
- common_switch_locale();
+ common_init_locale();
return mail_to_user($user, $subject, $body);
}
diff --git a/plugins/TwitterBridge/twitter.php b/plugins/TwitterBridge/twitter.php
index 896eee2da..21adc7a90 100644
--- a/plugins/TwitterBridge/twitter.php
+++ b/plugins/TwitterBridge/twitter.php
@@ -335,9 +335,9 @@ function remove_twitter_link($flink)
function mail_twitter_bridge_removed($user)
{
- $profile = $user->getProfile();
+ common_init_locale($user->language);
- common_switch_locale($user->language);
+ $profile = $user->getProfile();
$subject = sprintf(_m('Your Twitter bridge has been disabled.'));
@@ -354,7 +354,7 @@ function mail_twitter_bridge_removed($user)
common_local_url('twittersettings'),
common_config('site', 'name'));
- common_switch_locale();
+ common_init_locale();
return mail_to_user($user, $subject, $body);
}