mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 16:50:24 +00:00
More on help searching
This commit is contained in:
@@ -7,12 +7,14 @@ my ($cgi) = @_;
|
||||
if ($cgi eq 'edit_user.cgi') {
|
||||
local ($u) = grep { &can_edit_user($u->{'name'}) }
|
||||
&list_users();
|
||||
return $u ? 'user='.&urlize($u->{'name'}) : 'none';
|
||||
return $u ? 'user='.&urlize($u->{'name'}) :
|
||||
$access{'create'} ? '' : 'none';
|
||||
}
|
||||
elsif ($cgi eq 'edit_group.cgi') {
|
||||
local ($u) = grep { &can_edit_group($u->{'name'}) }
|
||||
&list_groups();
|
||||
return $u ? 'group='.&urlize($u->{'name'}) : 'none';
|
||||
return $u ? 'group='.&urlize($u->{'name'}) :
|
||||
$access{'groups'} ? '' : 'none';
|
||||
}
|
||||
elsif ($cgi eq 'edit_acl.cgi') {
|
||||
local ($u) = grep { &can_edit_user($u->{'name'}) }
|
||||
|
||||
13
backup-config/cgi_args.pl
Normal file
13
backup-config/cgi_args.pl
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
do 'backup-config-lib.pl';
|
||||
|
||||
sub cgi_args
|
||||
{
|
||||
my ($cgi) = @_;
|
||||
if ($cgi eq 'edit.cgi') {
|
||||
my @backups = &list_backups();
|
||||
return @backups ? 'id='.&urlize($backups[0]->{'id'})
|
||||
: 'new=1';
|
||||
}
|
||||
return undef;
|
||||
}
|
||||
@@ -4,7 +4,7 @@ do 'usermin-lib.pl';
|
||||
sub cgi_args
|
||||
{
|
||||
my ($cgi) = @_;
|
||||
if ($cgi =~ /^edit_/) {
|
||||
if ($cgi =~ /^edit_/ || $cgi eq 'index.cgi') {
|
||||
# No args needed for sure
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ do 'webmin-lib.pl';
|
||||
sub cgi_args
|
||||
{
|
||||
my ($cgi) = @_;
|
||||
if ($cgi =~ /^edit_/) {
|
||||
if ($cgi =~ /^edit_/ || $cgi eq 'index.cgi') {
|
||||
# No args needed for sure
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -346,10 +346,11 @@ if (-r "$mroot/cgi_args.pl") {
|
||||
return $args;
|
||||
}
|
||||
}
|
||||
# Guess if any are needed
|
||||
if ($cgi eq "index.cgi") {
|
||||
# Index page is always safe to link to
|
||||
return undef;
|
||||
}
|
||||
# Otherwise check if it appears to parse any args
|
||||
local $data = &read_file_contents($mroot."/".$cgi);
|
||||
if ($data =~ /ReadParse\(/) {
|
||||
return "none";
|
||||
|
||||
Reference in New Issue
Block a user