From: Barijaona Ramaholimihaso Date: Sat, 22 Sep 2007 08:56:39 +0000 (+0000) Subject: Avoid "conditional and" for running plugins "entries" X-Git-Tag: v2_1_0~57 X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fblosxom.git;a=commitdiff_plain;h=35adf25fd50df6682d227833899a1a1c22885695;ds=sidebyside Avoid "conditional and" for running plugins "entries" --- diff --git a/blosxom.cgi b/blosxom.cgi index 2c6b6ee..1ee05fa 100755 --- a/blosxom.cgi +++ b/blosxom.cgi @@ -317,7 +317,14 @@ $entries = # Plugins: Entries # Allow for the first encountered plugin::entries subroutine to override the # default built-in entries subroutine -my $tmp; foreach my $plugin ( @plugins ) { $plugins{$plugin} > 0 and $plugin->can('entries') and defined($tmp = $plugin->entries()) and $entries = $tmp and last; } +foreach my $plugin (@plugins) { + if ( $plugins{$plugin} > 0 and $plugin->can('entries') ) { + if ( my $tmp = $plugin->entries() ) { + $entries = $tmp; + last; + } + } +} my ($files, $indexes, $others) = &$entries(); %indexes = %$indexes;