From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: [PATCH] firewalllogcountry.dat: Do not show 'Details' button for unkonw location. Date: Sun, 18 Oct 2015 18:54:58 +0100 Message-ID: <1445190898.2626.4.camel@ipfire.org> In-Reply-To: <1445167412-3298-1-git-send-email-stefan.schantl@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5232789545276015009==" List-Id: --===============5232789545276015009== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Merged. On Sun, 2015-10-18 at 13:23 +0200, Stefan Schantl wrote: > 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 > --- > html/cgi-bin/logs.cgi/firewalllogcountry.dat | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/html/cgi-bin/logs.cgi/firewalllogcountry.dat b/html/cgi > -bin/logs.cgi/firewalllogcountry.dat > index 29c0842..f998a62 100644 > --- a/html/cgi-bin/logs.cgi/firewalllogcountry.dat > +++ b/html/cgi-bin/logs.cgi/firewalllogcountry.dat > @@ -456,7 +456,17 @@ for($s=0;$s<$lines;$s++) > $color++; > print ""; > > - print "
action='showrequestfromcountry.dat'> value='$cgiparams{'MONTH'}'> value='$cgiparams{'DAY'}'> value='$key[$s]'>
"; > + print ""; > + > + # Dont show details button for "unknown" location. > + if ($key[$s] ne 'unknown') { > + print"
action='showrequestfromcountry.dat'>"; > + print" value='$cgiparams{'MONTH'}'>"; > + print" value='$cgiparams{'DAY'}'>"; > + print" value='$key[$s]'>"; > + print"
"; > + } > + > if($key[$s] eq 'blue0' || $key[$s] eq 'green0' || $key[$s] eq > 'orange0') { > print "$key[$s]"; > } --===============5232789545276015009== Content-Type: application/pgp-signature Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="signature.asc" MIME-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