X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fblosxom.git;a=blobdiff_plain;f=blosxom.cgi;h=0c483e9c4c5b17e7fc3a530c3a4cb7373664567d;hp=ee085a38503133baeabd150cff5e7d849500f66d;hb=d7d51de9210879cc0c0c6d056388b42b2ef894c1;hpb=aba7cd50d01142480d706bba489f0076bab740f9 diff --git a/blosxom.cgi b/blosxom.cgi index ee085a3..0c483e9 100755 --- a/blosxom.cgi +++ b/blosxom.cgi @@ -258,7 +258,14 @@ shift @INC foreach @plugin_dirs; # Plugins: Template # Allow for the first encountered plugin::template subroutine to override the # default built-in template subroutine -my $tmp; foreach my $plugin ( @plugins ) { $plugins{$plugin} > 0 and $plugin->can('template') and defined($tmp = $plugin->template()) and $template = $tmp and last; } +foreach my $plugin (@plugins) { + if ( $plugins{$plugin} > 0 and $plugin->can('template') ) { + if ( my $tmp = $plugin->template() ) { + $template = $tmp; + last; + } + } +} # Provide backward compatibility for Blosxom < 2.0rc1 plug-ins sub load_template {