X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fblosxom.git;a=blobdiff_plain;f=blosxom.cgi;h=920a7835db7c4e215d4046adbae2d835c808d02c;hp=c53b153b2a73500b5978c51148393667418507fe;hb=8b0659156fafd39059d8e3e4a617eafa320a3b68;hpb=f24c1e459d4ced39f5d529b526aa324a058ef1e7 diff --git a/blosxom.cgi b/blosxom.cgi index c53b153..920a783 100755 --- a/blosxom.cgi +++ b/blosxom.cgi @@ -2,8 +2,9 @@ # Blosxom # Author: Rael Dornfest -# Version: 2.0 -# Home/Docs/Licensing: http://www.raelity.org/apps/blosxom/ +# Version: 2.0.1 +# Home/Docs/Licensing: http://www.blosxom.com/ +# Development/Downloads: http://sourceforge.net/projects/blosxom package blosxom; @@ -220,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) { @@ -249,7 +247,9 @@ if (!$ENV{GATEWAY_INTERFACE} and param('-password') and $static_password and par if ($indexes{$path} == 1) { # category $path_info = $p; - print $fh_w &generate('static', $p, '', $flavour, $content_type); + # individual story + $path_info =~ s!\.$file_extension$!\.$flavour!; + print $fh_w &generate('static', $path_info, '', $flavour, $content_type); } else { # date local ($path_info_yr,$path_info_mo,$path_info_da, $path_info) = @@ -280,6 +280,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