From 43b7dc314234e476a80d9acbd07292d7286cca5a Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Wed, 2 Apr 2008 22:42:25 +0000 Subject: Bug 405946: Some emails are not sent in the language chosen by the addressee - Patch by Frédéric Buclin r=wurblzap a=LpSolit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sanitycheck.cgi | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'sanitycheck.cgi') diff --git a/sanitycheck.cgi b/sanitycheck.cgi index 57dca0c31..9aa5e345b 100755 --- a/sanitycheck.cgi +++ b/sanitycheck.cgi @@ -69,7 +69,15 @@ my $user = Bugzilla->login(LOGIN_REQUIRED); my $cgi = Bugzilla->cgi; my $dbh = Bugzilla->dbh; -my $template = Bugzilla->template; +# If the result of the sanity check is sent per email, then we have to +# take the user prefs into account rather than querying the web browser. +my $template; +if (Bugzilla->usage_mode == USAGE_MODE_CMDLINE) { + $template = Bugzilla->template_inner($user->settings->{'lang'}->{'value'}); +} +else { + $template = Bugzilla->template; +} my $vars = {}; print $cgi->header() unless Bugzilla->usage_mode == USAGE_MODE_CMDLINE; -- cgit v1.2.3-24-g4f1b