mirror of
https://github.com/webmin/webmin.git
synced 2025-07-23 00:30:33 +00:00
22 lines
488 B
Perl
Executable File
22 lines
488 B
Perl
Executable File
|
|
do 'procmail-lib.pl';
|
|
|
|
sub cgi_args
|
|
{
|
|
my ($cgi) = @_;
|
|
my @conf = &get_procmailrc();
|
|
if ($cgi eq 'edit_recipe.cgi') {
|
|
my ($r) = grep { !$_->{'name'} && !$_->{'include'} } @conf;
|
|
return $r ? 'idx='.$r->{'index'} : 'new=1';
|
|
}
|
|
elsif ($cgi eq 'edit_env.cgi') {
|
|
my ($r) = grep { $_->{'name'} } @conf;
|
|
return $r ? 'idx='.$r->{'index'} : 'new=1';
|
|
}
|
|
elsif ($cgi eq 'edit_inc.cgi') {
|
|
my ($r) = grep { $_->{'include'} } @conf;
|
|
return $r ? 'idx='.$r->{'index'} : 'new=1';
|
|
}
|
|
return undef;
|
|
}
|