From: Stefan Schantl Date: Sat, 16 Mar 2019 11:57:25 +0000 (+0100) Subject: logs.cgi/ids.dat: Fixup processing dates from logfiles which contains a year X-Git-Tag: v2.23-core131~108 X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff_plain;h=7bf5b0f22194fcb617f3e678c4a1c492b0faf01d logs.cgi/ids.dat: Fixup processing dates from logfiles which contains a year Signed-off-by: Stefan Schantl Signed-off-by: Michael Tremer --- diff --git a/html/cgi-bin/logs.cgi/ids.dat b/html/cgi-bin/logs.cgi/ids.dat index e374f5711d..1447a06f05 100644 --- a/html/cgi-bin/logs.cgi/ids.dat +++ b/html/cgi-bin/logs.cgi/ids.dat @@ -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); } }