]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - html/cgi-bin/logs.cgi/ids.dat
logs.cgi/ids.dat: Dont display/export empty events.
[ipfire-2.x.git] / html / cgi-bin / logs.cgi / ids.dat
index fba1cbc195e03c0813abd34c6f010efd351edb65..21737511f8bc2ad7e17c7a59878ac9f2d586404b 100644 (file)
@@ -167,6 +167,10 @@ if ($cgiparams{'ACTION'} eq $Lang::tr{'export'})
        {
                my ($datetime,$title,$priority,$classification,$srcip,$srcport,$destip,$destport,$sid,$refs) = split(/\|/);
                $refs =~ s/,$//;
+
+               # Skip event if no datetime and title are available.
+               next unless (($datetime) && ($title));
+
                print "Date: $datetime\n";
                print "Name: $title\n";
                print "Priority: $priority\n";
@@ -285,6 +289,10 @@ foreach $_ (@slice)
        else {
                print "<tr bgcolor='$color{'color22'}'><td>\n"; }
        my ($datetime,$title,$priority,$classification,$srcip,$srcport,$destip,$destport,$sid,$refs) = split(/\|/);
+
+       # Only show the current event if at least datetime and title are available.
+       next unless (($datetime) && ($title));
+
        print <<END
 <table width='100%'>
 <tr>