]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
firewalllogcountry.dat: Do not show 'Details' button for unkonw location.
authorStefan Schantl <stefan.schantl@ipfire.org>
Sun, 18 Oct 2015 11:23:32 +0000 (13:23 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 18 Oct 2015 17:53:58 +0000 (18:53 +0100)
The CGI offers the posibility to get more details for a certain locations
by clicking on a button.

This feature cannot be used for the category "unknown". To prevent users
from beeing confused about non show-able details, I added some code to hide
this button for this category.

Fixes #10726.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/logs.cgi/firewalllogcountry.dat

index 29c0842188b8974e1e08b3812e65be2bb18bfa52..f998a6201f344b01a56a3d4e137a3828fd0c3556 100644 (file)
@@ -456,7 +456,17 @@ for($s=0;$s<$lines;$s++)
   $color++;
   print "<tr>";
 
-  print "<td align='center' $col><form method='post' action='showrequestfromcountry.dat'><input type='hidden' name='MONTH' value='$cgiparams{'MONTH'}'> <input type='hidden' name='DAY' value='$cgiparams{'DAY'}'> <input type='hidden' name='country' value='$key[$s]'> <input type='submit' value='details'></form></td>";
+  print "<td align='center' $col>";
+
+  # Dont show details button for "unknown" location.
+  if ($key[$s] ne 'unknown') {
+       print"<form method='post' action='showrequestfromcountry.dat'>";
+       print"<input type='hidden' name='MONTH' value='$cgiparams{'MONTH'}'>";
+       print"<input type='hidden' name='DAY' value='$cgiparams{'DAY'}'>";
+       print"<input type='hidden' name='country' value='$key[$s]'>";
+       print"<input type='submit' value='details'></form>";
+  }
+
   if($key[$s] eq 'blue0' || $key[$s] eq 'green0' || $key[$s] eq 'orange0') {
       print "<td align='center' $col>$key[$s]</td>";
   }