From 35adf25fd50df6682d227833899a1a1c22885695 Mon Sep 17 00:00:00 2001 From: Barijaona Ramaholimihaso Date: Sat, 22 Sep 2007 08:56:39 +0000 Subject: [PATCH] Avoid "conditional and" for running plugins "entries" --- blosxom.cgi | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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; -- 2.39.2