]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 939844: Don't cache template filters when arguments are supplied
authorByron Jones <bjones@mozilla.com>
Tue, 19 Nov 2013 13:51:18 +0000 (21:51 +0800)
committerByron Jones <bjones@mozilla.com>
Tue, 19 Nov 2013 13:51:18 +0000 (21:51 +0800)
r=LpSolit, a=glob

Bugzilla/Template/Context.pm

index ce1718e0fbd56e04909f3c6f1b7d3c530627c959..1e75d1d6f1a2229a73fc25247514244b7ec37bc7 100644 (file)
@@ -88,7 +88,8 @@ 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.
-    $self->SUPER::filter($name, $args, $name);
+    # 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.