]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
logs.cgi/ids.dat: Fixup processing dates from logfiles which contains a year
authorStefan Schantl <stefan.schantl@ipfire.org>
Sat, 16 Mar 2019 11:57:25 +0000 (12:57 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 16 Mar 2019 12:27:55 +0000 (12:27 +0000)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
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);
        }
 }