From: Erik Kapfer Date: Wed, 20 Jun 2012 17:54:09 +0000 (+0200) Subject: openvpn: Sort connections by name. X-Git-Tag: v2.11-core61^2~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=542b31d622df206df102d4450abef437058d137b;p=people%2Fms%2Fipfire-2.x.git openvpn: Sort connections by name. --- diff --git a/html/cgi-bin/index.cgi b/html/cgi-bin/index.cgi index 07dc9e7fb8..9f559275a1 100644 --- a/html/cgi-bin/index.cgi +++ b/html/cgi-bin/index.cgi @@ -356,7 +356,7 @@ END END my $id = 0; my $gif; - foreach my $key (keys %confighash) { + foreach my $key (sort { uc($confighash{$a}[1]) cmp uc($confighash{$b}[1]) } keys %confighash) { if ($confighash{$key}[0] eq 'on') { $gif = 'on.gif'; } else { $gif = 'off.gif'; } if ($id % 2) { diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi index 0c4502da6b..0798128ebb 100644 --- a/html/cgi-bin/ovpnmain.cgi +++ b/html/cgi-bin/ovpnmain.cgi @@ -3873,7 +3873,7 @@ END ; my $id = 0; my $gif; - foreach my $key (keys %confighash) { + foreach my $key (sort { uc($confighash{$a}[1]) cmp uc($confighash{$b}[1]) } keys %confighash) { if ($confighash{$key}[0] eq 'on') { $gif = 'on.gif'; } else { $gif = 'off.gif'; } if ($id % 2) {