summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla.pm3
-rw-r--r--Bugzilla/Error.pm9
-rw-r--r--Bugzilla/Template.pm3
3 files changed, 2 insertions, 13 deletions
diff --git a/Bugzilla.pm b/Bugzilla.pm
index cba448112..021783a75 100644
--- a/Bugzilla.pm
+++ b/Bugzilla.pm
@@ -518,9 +518,6 @@ sub error_mode {
if (defined $newval) {
$class->request_cache->{error_mode} = $newval;
}
- if ($class->template->in_process) {
- return ERROR_MODE_DIE;
- }
return $class->request_cache->{error_mode}
|| (i_am_cgi() ? ERROR_MODE_WEBPAGE : ERROR_MODE_DIE);
}
diff --git a/Bugzilla/Error.pm b/Bugzilla/Error.pm
index 927745201..fa898fba4 100644
--- a/Bugzilla/Error.pm
+++ b/Bugzilla/Error.pm
@@ -99,13 +99,8 @@ sub _throw_error {
# and calling $template->process over and over for those errors
# is too slow. So instead, we just "die" with a dump of the arguments.
if (Bugzilla->error_mode != ERROR_MODE_TEST) {
- if (Bugzilla->template->in_process) {
- $message = "error inside Bugzilla->template->process: $error";
- }
- else {
- $template->process($name, $vars, \$message)
- || ThrowTemplateError($template->error());
- }
+ $template->process($name, $vars, \$message)
+ || ThrowTemplateError($template->error());
}
# Let's call the hook first, so that extensions can override
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index 5b3b045ab..56ebd9c21 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -665,15 +665,12 @@ $Template::Stash::SCALAR_OPS->{ truncate } =
###############################################################################
-our $_in_process = 0;
-sub in_process { return $_in_process }
sub process {
my $self = shift;
# All of this current_langs stuff allows template_inner to correctly
# determine what-language Template object it should instantiate.
my $current_langs = Bugzilla->request_cache->{template_current_lang} ||= [];
unshift(@$current_langs, $self->context->{bz_language});
- local $_in_process = 1;
my $retval = $self->SUPER::process(@_);
shift @$current_langs;
return $retval;