From: Barijaona Ramaholimihaso Date: Sat, 22 Sep 2007 06:18:04 +0000 (+0000) Subject: Avoid "conditional and" for running plugins "sort" X-Git-Tag: debian/2.1.2-2~94 X-Git-Url: https://git.deb.at/?p=pkg%2Fblosxom.git;a=commitdiff_plain;h=3a72032199c6b85617b33db0132edadf47ccd330 Avoid "conditional and" for running plugins "sort" --- 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/;