Avoid "conditional and" for testing if $date should be added to $output
authorBarijaona Ramaholimihaso <barijaona@users.sourceforge.net>
Sat, 22 Sep 2007 10:12:27 +0000 (10:12 +0000)
committerBarijaona Ramaholimihaso <barijaona@users.sourceforge.net>
Sat, 22 Sep 2007 10:12:27 +0000 (10:12 +0000)
blosxom.cgi

index 2e87b75..ee085a3 100755 (executable)
@@ -515,7 +515,10 @@ sub generate {
   
       $date = &$interpolate($date);
   
-      $curdate ne $date and $curdate = $date and $output .= $date;
+      if ( $date && $curdate ne $date ) {
+          $curdate = $date;
+          $output .= $date;
+      }
       
       use vars qw/ $title $body $raw /;
       if (-f "$path_file" && $fh->open("< $path_file")) {