From 74a89b1fc37067d91d31bd66922053361eb4e616 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 19 May 2010 10:10:55 -0700 Subject: 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. --- plugins/Facebook/facebookutil.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/Facebook') diff --git a/plugins/Facebook/facebookutil.php b/plugins/Facebook/facebookutil.php index ac532e18b..83664995a 100644 --- a/plugins/Facebook/facebookutil.php +++ b/plugins/Facebook/facebookutil.php @@ -272,12 +272,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)); @@ -291,7 +291,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_init_locale(); + common_switch_locale(); return mail_to_user($user, $subject, $body); } -- cgit v1.2.3-54-g00ecf