Handle hostnames with upper-case letters
[webmin.git] / apache / save_files.cgi
1 #!/usr/local/bin/perl
2 # save_files.cgi
3 # Save some kind of per-files options
4
5 require './apache-lib.pl';
6 &ReadParse();
7 $access{'global'} || &error($text{'htaccess_ecannot'});
8 $access_types{$in{'type'}} || &error($text{'etype'});
9 &allowed_auth_file($in{'file'}) || &error($text{'htindex_ecannot'});
10 $hconf = &get_htaccess_config($in{'file'});
11 $d = $hconf->[$in{'idx'}];
12 $conf = $d->{'members'};
13 @edit = &editable_directives($in{'type'}, 'directory');
14
15 &lock_file($in{'file'});
16 &error_setup(&text('efailed', $text{"type_$in{'type'}"}));
17 &parse_inputs(\@edit, $conf, $hconf);
18 &unlock_file($in{'file'});
19 &webmin_log("files", $in{'type'}, "$in{'file'}:$d->{'words'}->[0]", \%in);
20
21 &redirect("files_index.cgi?file=".&urlize($in{'file'})."&idx=$in{'idx'}");