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 e374f57..1447a06 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);
        }
 }