Handle hostnames with upper-case letters
[webmin.git] / apache / mod_dav.pl
1 # mod_dav.pl
2 # Editors for DAV directives
3
4 sub mod_dav_directives
5 {
6 local $rv;
7 $rv = [ [ 'Dav', 0, 5, 'directory' ],
8         [ 'DavDepthInfinity', 0, 5, 'virtual directory' ],
9         [ 'DavMinTimeout', 0, 5, 'virtual directory' ],
10       ];
11 return &make_directives($rv, $_[0], "mod_dav");
12 }
13
14 sub edit_Dav
15 {
16 local @extra;
17 push(@extra, "$_[0]->{'value'},$_[0]->{'value'}")
18         if ($_[0]->{'value'} && $_[0]->{'value'} !~ /^(on|off)$/i);
19 return (1, $text{'mod_dav_active'},
20         &choice_input($_[0]->{'value'}, "Dav", "",
21               "$text{'yes'},on", "$text{'no'},off", @extra, "$text{'default'},"));
22 }
23 sub save_Dav
24 {
25 return &parse_choice("Dav");
26 }
27
28 sub edit_DavDepthInfinity
29 {
30 return (1, $text{'mod_dav_inf'},
31         &choice_input($_[0]->{'value'}, "DavDepthInfinity", "",
32               "$text{'yes'},on", "$text{'no'},off", "$text{'default'},"));
33 }
34 sub save_DavDepthInfinity
35 {
36 return &parse_choice("DavDepthInfinity");
37 }
38
39 sub edit_DavMinTimeout
40 {
41 return (1,
42         $text{'mod_dav_timeout'},
43         &opt_input($_[0]->{'value'}, "DavMinTimeout", $text{'default'}, 4));
44 }
45 sub save_DavMinTimeout
46 {
47 return &parse_opt("DavMinTimeout", '^\d+$',
48                   $text{'mod_dav_etimeout'});
49 }
50
51 1;
52