Handle hostnames with upper-case letters
[webmin.git] / quota / group_grace_save.cgi
1 #!/usr/local/bin/perl
2 # group_grace_save.cgi
3 # Update the grace times for groups on some filesystem
4
5 require './quota-lib.pl';
6 &ReadParse();
7 $whatfailed = $text{'ggraces_esave'};
8 $access{'ggrace'} && &can_edit_filesys($in{'filesys'}) ||
9         &error($text{'ggraces_eedit'});
10
11 if ($in{'bdef'}) { push(@args, 0, 0); }
12 elsif ($in{'btime'} !~ /^[0-9\.]+$/)
13         { &error(&text('ggraces_enumber', $in{'btime'})); }
14 else { push(@args, ($in{'btime'}, $in{'bunits'})); }
15
16 if ($in{'fdef'}) { push(@args, 0, 0); }
17 elsif ($in{'ftime'} !~ /^[0-9\.]+$/)
18         { &error(&text('ggraces_enumber', $in{'ftime'})); }
19 else { push(@args, ($in{'ftime'}, $in{'funits'})); }
20
21 &edit_group_grace($in{'filesys'}, @args);
22 &webmin_log("grace", "group", $in{'filesys'}, \%in);
23 &redirect("list_groups.cgi?dir=".&urlize($in{'filesys'}));
24