From 3a72032199c6b85617b33db0132edadf47ccd330 Mon Sep 17 00:00:00 2001 From: Barijaona Ramaholimihaso Date: Sat, 22 Sep 2007 06:18:04 +0000 Subject: [PATCH] Avoid "conditional and" for running plugins "sort" --- blosxom.cgi | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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/; -- 2.39.5