X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fblosxom.git;a=blobdiff_plain;f=blosxom.cgi;h=49dd4c2da57281c2bcb59151a0b61cfae3d88cf2;hp=7fff46341709f41d608f3e0a8650911322c4adc2;hb=3a72032199c6b85617b33db0132edadf47ccd330;hpb=ed43f9cbb775f818ea14ed642f9f386a6283c000 diff --git a/blosxom.cgi b/blosxom.cgi index 7fff463..49dd4c2 100755 --- a/blosxom.cgi +++ b/blosxom.cgi @@ -449,7 +449,14 @@ sub generate { # Plugins: Sort # Allow for the first encountered plugin::sort subroutine to override the # default built-in sort subroutine - my $tmp; foreach my $plugin ( @plugins ) { $plugins{$plugin} > 0 and $plugin->can('sort') and defined($tmp = $plugin->sort()) and $sort = $tmp and last; } + foreach my $plugin (@plugins) { + if ( $plugins{$plugin} > 0 and $plugin->can('sort') ) { + if ( my $tmp = $plugin->sort() ) { + $sort = $tmp; + last; + } + } + } foreach my $path_file ( &$sort(\%f, \%others) ) { last if $ne <= 0 && $date !~ /\d/;