Handle hostnames with upper-case letters
[webmin.git] / squid / save_delay.cgi
1 #!/usr/local/bin/perl
2 # save_delay.cgi
3 # Save global delay pool options
4
5 require './squid-lib.pl';
6 $access{'delay'} || &error($text{'delay_ecannot'});
7 &ReadParse();
8 &lock_file($config{'squid_conf'});
9 $conf = &get_config();
10 &error_setup($text{'delay_err'});
11
12 &save_opt("delay_initial_bucket_level", \&check_initial, $conf);
13 &flush_file_lines();
14 &unlock_file($config{'squid_conf'});
15 &webmin_log("delay", undef, undef, \%in);
16 &redirect("");
17
18 sub check_initial
19 {
20 return $_[0] =~ /^\d+$/ ? undef : &text('delay_epercent', $_[0]);
21 }
22