Handle hostnames with upper-case letters
[webmin.git] / quota / user_grace_save.cgi
1 #!/usr/local/bin/perl
2 # user_grace_save.cgi
3 # Update the grace times for users on some filesystem
4
5 require './quota-lib.pl';
6 &ReadParse();
7 $whatfailed = $text{'ugraces_esave'};
8 $access{'ugrace'} && &can_edit_filesys($in{'filesys'}) ||
9         &error($text{'ugraces_eedit'});
10
11 if ($in{'bdef'}) { push(@args, 0, 0); }
12 elsif ($in{'btime'} !~ /^[0-9\.]+$/)
13         { &error(&text('ugraces_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('ugraces_enumber', $in{'ftime'})); }
19 else { push(@args, ($in{'ftime'}, $in{'funits'})); }
20
21 &edit_user_grace($in{'filesys'}, @args);
22 &webmin_log("grace", "user", $in{'filesys'}, \%in);
23 &redirect("list_users.cgi?dir=".&urlize($in{'filesys'}));
24