aboutsummaryrefslogtreecommitdiffstats
path: root/sanitycheck.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2008-04-02 22:42:25 +0000
committerlpsolit%gmail.com <>2008-04-02 22:42:25 +0000
commit43b7dc314234e476a80d9acbd07292d7286cca5a (patch)
tree87c77bfa7d65b7636447232feb77fe5db1d7d8d4 /sanitycheck.cgi
parent0e4b8f785d87afacbf432f6985a3d906b35bba21 (diff)
downloadbugs-43b7dc314234e476a80d9acbd07292d7286cca5a.tar
bugs-43b7dc314234e476a80d9acbd07292d7286cca5a.tar.gz
bugs-43b7dc314234e476a80d9acbd07292d7286cca5a.tar.bz2
bugs-43b7dc314234e476a80d9acbd07292d7286cca5a.tar.xz
bugs-43b7dc314234e476a80d9acbd07292d7286cca5a.zip
Bug 405946: Some emails are not sent in the language chosen by the addressee - Patch by Frédéric Buclin <LpSolit@gmail.com> r=wurblzap a=LpSolit
Diffstat (limited to 'sanitycheck.cgi')
-rwxr-xr-xsanitycheck.cgi10
1 files changed, 9 insertions, 1 deletions
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;