Handle hostnames with upper-case letters
[webmin.git] / procmail / cgi_args.pl
1
2 do 'procmail-lib.pl';
3
4 sub cgi_args
5 {
6 my ($cgi) = @_;
7 my @conf = &get_procmailrc();
8 if ($cgi eq 'edit_recipe.cgi') {
9         my ($r) = grep { !$_->{'name'} && !$_->{'include'} } @conf;
10         return $r ? 'idx='.$r->{'index'} : 'new=1';
11         }
12 elsif ($cgi eq 'edit_env.cgi') {
13         my ($r) = grep { $_->{'name'} } @conf;
14         return $r ? 'idx='.$r->{'index'} : 'new=1';
15         }
16 elsif ($cgi eq 'edit_inc.cgi') {
17         my ($r) = grep { $_->{'include'} } @conf;
18         return $r ? 'idx='.$r->{'index'} : 'new=1';
19         }
20 return undef;
21 }