From: Stefan Schantl Date: Tue, 12 May 2015 18:39:44 +0000 (+0200) Subject: geoip-block.cgi: Finish column after last element and uneven amount of items. X-Git-Tag: v2.17-core91~30^2^2~16^2~1 X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff_plain;h=0ee211ee6be85fa6d12bc6f9278fc2c0a44ea420 geoip-block.cgi: Finish column after last element and uneven amount of items. --- diff --git a/html/cgi-bin/geoip-block.cgi b/html/cgi-bin/geoip-block.cgi index ccbfa926a0..056b333e8c 100644 --- a/html/cgi-bin/geoip-block.cgi +++ b/html/cgi-bin/geoip-block.cgi @@ -225,7 +225,16 @@ foreach my $location (@locations) { print "$flag\n"; print "$ccode_uc\n"; print "$cname$line_end\n"; - + + # Finish column when the last element in the array has passed and we have an uneven amount of items. + if(! ($lines2 % 2) && ($location eq $locations[-1] )) { + print " \n"; + print " \n"; + print " \n"; + print " \n"; + print " \n"; + } + $lines2++; }