Handle hostnames with upper-case letters
[webmin.git] / firewall / cgi_args.pl
1
2 do 'firewall-lib.pl';
3
4 sub cgi_args
5 {
6 my ($cgi) = @_;
7 if ($cgi eq 'edit_rule.cgi') {
8         my @tables = grep { &can_edit_table($_->{'name'}) }
9                           &get_iptables_save();
10         if (@tables) {
11                 my @rules = @{$tables[0]->{'rules'}};
12                 if (@rules) {
13                         return 'table='.&urlize($tables[0]->{'name'}).
14                                '&idx='.$rules[0]->{'index'};
15                         }
16                 return 'table='.&urlize($tables[0]->{'name'}).'&new=1';
17                 }
18         return 'none';
19         }
20 return undef;
21 }