Bug 1356997 <http://sourceforge.net/tracker/index.php?func=detail&aid=1356997&group_i...
authorBarijaona Ramaholimihaso <barijaona@users.sourceforge.net>
Sun, 18 Dec 2005 02:29:51 +0000 (02:29 +0000)
committerBarijaona Ramaholimihaso <barijaona@users.sourceforge.net>
Sun, 18 Dec 2005 02:29:51 +0000 (02:29 +0000)
Patch 1356030 <http://sourceforge.net/tracker/index.php?func=detail&aid=1356030&group_id=148044&atid=770266>

Changed how plugins' filter subroutines are handled, so that in static rendering mode, they receive the correct file list.

blosxom.cgi

index 5bba603ba2b0876849b02864f9297229efb2de49..43afa7df017ec0d4152adf1d6d2156e7a68ec7b0 100755 (executable)
@@ -221,10 +221,7 @@ $entries =
 my $tmp; foreach my $plugin ( @plugins ) { $plugins{$plugin} > 0 and $plugin->can('entries') and defined($tmp = $plugin->entries()) and $entries = $tmp and last; }
 
 my ($files, $indexes, $others) = &$entries();
-%files = %$files; %indexes = %$indexes; %others = ref $others ? %$others : ();
-
-# Plugins: Filter
-foreach my $plugin ( @plugins ) { $plugins{$plugin} > 0 and $plugin->can('filter') and $entries = $plugin->filter(\%files, \%others) }
+%indexes = %$indexes;
 
 # Static
 if (!$ENV{GATEWAY_INTERFACE} and param('-password') and $static_password and param('-password') eq $static_password) {
@@ -281,6 +278,11 @@ foreach my $plugin ( @plugins ) { $plugins{$plugin} > 0 and $plugin->can('end')
 sub generate {
   my($static_or_dynamic, $currentdir, $date, $flavour, $content_type) = @_;
 
+  %files = %$files; %others = ref $others ? %$others : ();
+
+  # Plugins: Filter
+  foreach my $plugin ( @plugins ) { $plugins{$plugin} > 0 and $plugin->can('filter') and $entries = $plugin->filter(\%files, \%others) }
+
   my %f = %files;
 
   # Plugins: Skip