]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/logs.cgi/ids.dat
logs.cgi/ids.dat: Fixup processing dates from logfiles which contains a year
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / logs.cgi / ids.dat
index e374f5711d32e28e7819e126fcb0e1b82d55fc5e..1447a06f0559f790f5e1f51a5b59e26ca97b7c4d 100644 (file)
@@ -460,7 +460,14 @@ sub processevent
                        }
                }
                $line++;
-               unless ($line == 1 || $date ne "$monthstr/$daystr") { &append; }
+
+               # Split the date into single chunks.
+               my ($month, $day, $year) = split('/', $date);
+
+               # Check if all data is collected and the date of the event fits the desired date to
+               # get displayed.
+               if ($line gt 1 || "$month/$day" eq "$monthstr/$daystr") { &append; }
+
                close(LOG);
        }
 }