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 2e87b759c77a8acbaebd1749e6cf1215df584858..ee085a38503133baeabd150cff5e7d849500f66d 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")) {