]> git.deb.at Git - pkg/blosxom.git/commitdiff
Avoid "conditional and" for running plugins "sort"
authorBarijaona Ramaholimihaso <barijaona@users.sourceforge.net>
Sat, 22 Sep 2007 06:18:04 +0000 (06:18 +0000)
committerBarijaona Ramaholimihaso <barijaona@users.sourceforge.net>
Sat, 22 Sep 2007 06:18:04 +0000 (06:18 +0000)
blosxom.cgi

index 7fff46341709f41d608f3e0a8650911322c4adc2..49dd4c2da57281c2bcb59151a0b61cfae3d88cf2 100755 (executable)
@@ -449,7 +449,14 @@ sub generate {
     # Plugins: Sort
     # Allow for the first encountered plugin::sort subroutine to override the
     # default built-in sort subroutine
     # 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/;
   
     foreach my $path_file ( &$sort(\%f, \%others) ) {
       last if $ne <= 0 && $date !~ /\d/;