summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Template/Context.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Template/Context.pm')
-rw-r--r--Bugzilla/Template/Context.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/Bugzilla/Template/Context.pm b/Bugzilla/Template/Context.pm
index 7923603e5..b3e3446f6 100644
--- a/Bugzilla/Template/Context.pm
+++ b/Bugzilla/Template/Context.pm
@@ -95,6 +95,14 @@ sub stash {
return $stash;
}
+sub filter {
+ my ($self, $name, $args) = @_;
+ # If we pass an alias for the filter name, the filter code is cached
+ # instead of looking for it at each call.
+ # If the filter has arguments, then we can't cache it.
+ $self->SUPER::filter($name, $args, $args ? undef : $name);
+}
+
# We need a DESTROY sub for the same reason that Bugzilla::CGI does.
sub DESTROY {
my $self = shift;