summaryrefslogtreecommitdiffstats
path: root/sanitycheck.cgi
diff options
context:
space:
mode:
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;