]> git.deb.at Git - pkg/blosxom.git/blobdiff - blosxom.cgi
Avoid "conditional and" for adding header to $output
[pkg/blosxom.git] / blosxom.cgi
index 3138fcc7e24a6918edbeddb9505bbc3d4c2bbed8..bba92f18a07e149f5516054e10f088d048b9e713 100755 (executable)
@@ -538,12 +538,16 @@ sub generate {
     $output .= $foot;
 
     # Plugins: Last
-    foreach my $plugin ( @plugins ) { $plugins{$plugin} > 0 and $plugin->can('last') and $entries = $plugin->last() }
+    foreach my $plugin (@plugins) {
+        if ( $plugins{$plugin} > 0 and $plugin->can('last') ) {
+            $entries = $plugin->last();
+        }
+    }
 
   } # End skip
 
   # Finally, add the header, if any and running dynamically
-  $static_or_dynamic eq 'dynamic' and $header and $output = header($header) . $output;
+  $output = header($header) . $output if ($static_or_dynamic eq 'dynamic' and $header);
   
   $output;
 }