IPS logging: Fix date comparison for last entry
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 12 Apr 2019 16:36:54 +0000 (17:36 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 12 Apr 2019 16:36:54 +0000 (17:36 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/logs.cgi/ids.dat

index b2bd9f1..8918bc6 100644 (file)
@@ -446,12 +446,9 @@ sub processevent
                }
                $line++;
 
-               # 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; }
+               if ($line gt 1 && $date eq "$monthstr/$daystr") { &append; }
 
                close(LOG);
        }