From ed62bbfb521de113f824228fed88f2f8f962035a Mon Sep 17 00:00:00 2001 From: Alexander Marx Date: Wed, 23 Jan 2013 05:51:30 +0100 Subject: [PATCH] Forward Firewall: changed sortorder in group tables --- html/cgi-bin/fwhosts.cgi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/html/cgi-bin/fwhosts.cgi b/html/cgi-bin/fwhosts.cgi index 278d57c0a..1afe0cda2 100755 --- a/html/cgi-bin/fwhosts.cgi +++ b/html/cgi-bin/fwhosts.cgi @@ -1348,7 +1348,7 @@ sub viewtablenet END } my $count=0; - foreach my $key (sort { uc($customnetwork{$a}[0]) cmp uc($customnetwork{$b}[0]) } keys %customnetwork) { + foreach my $key (sort {$a <=> $b} keys %customnetwork) { if ($fwhostsettings{'ACTION'} eq 'editnet' && $fwhostsettings{'HOSTNAME'} eq $customnetwork{$key}[0]) { print" "; }elsif ($count % 2) @@ -1395,7 +1395,7 @@ sub viewtablehost END } my $count=0; - foreach my $key (sort { uc($customhost{$a}[0]) cmp uc($customhost{$b}[0]) } keys %customhost) { + foreach my $key (sort {$a <=> $b} keys %customhost) { if ( ($fwhostsettings{'ACTION'} eq 'edithost' || $fwhostsettings{'error'}) && $fwhostsettings{'HOSTNAME'} eq $customhost{$key}[0]) { print" "; }elsif ($count % 2){ print" ";} @@ -1442,7 +1442,7 @@ sub viewtablegrp { print "
$Lang::tr{'fwhost empty'}"; }else{ - foreach my $key (sort { uc($customgrp{$a}[0]) cmp uc($customgrp{$b}[0]) } sort { uc($customgrp{$a}[2]) cmp uc($customgrp{$b}[2]) } keys %customgrp){ + foreach my $key (sort {$a <=> $b} keys %customgrp){ $count++; if ($helper ne $customgrp{$key}[0]){ @@ -1502,7 +1502,7 @@ sub viewtableservice END - foreach my $key (sort { uc($customservice{$a}[0]) cmp uc($customservice{$b}[0]) } keys %customservice) + foreach my $key (sort {$a <=> $b} keys %customservice) { $count++; if ( ($fwhostsettings{'updatesrv'} eq 'on' || $fwhostsettings{'error'}) && $fwhostsettings{'SRV_NAME'} eq $customservice{$key}[0]) { @@ -1542,7 +1542,7 @@ sub viewtableservicegrp &Header::openbox('100%', 'left', $Lang::tr{'fwhost cust srvgrp'}); &General::readhasharray("$configsrvgrp", \%customservicegrp); my $number= keys %customservicegrp; - foreach my $key (sort { uc($customservicegrp{$a}[0]) cmp uc($customservicegrp{$b}[0]) } keys %customservicegrp){ + foreach my $key (sort { uc($customservicegrp{$a}[2]) cmp uc($customservicegrp{$b}[2]) } keys %customservicegrp){ $count++; if ($helper ne $customservicegrp{$key}[0]){ $grpname=$customservicegrp{$key}[0]; -- 2.39.2
$Lang::tr{'fwhost srv_name'}$Lang::tr{'fwhost prot'}$Lang::tr{'fwhost port'}ICMP$Lang::tr{'fwhost used'}