2 # Defines editors content negotiation directives
4 sub mod_negotiation_directives
6 $rv = [ [ 'CacheNegotiatedDocs', 0, 6, 'global' ],
7 [ 'LanguagePriority', 0, 19, 'virtual directory htaccess' ] ];
8 return &make_directives($rv, $_[0], "mod_negotiation");
11 sub mod_negotiation_handlers
16 sub edit_CacheNegotiatedDocs
18 if ($_[1]->{'version'} < 2.0) {
19 local $v = $_[0] ? "1" : "0";
20 return (1, $text{'mod_negotiation_cache'},
21 &choice_input($v, "CacheNegotiatedDocs", "0",
22 "$text{'yes'},1", "$text{'no'},0"));
25 return (1, $text{'mod_negotiation_cache'},
26 &choice_input($_[0]->{'value'}, "CacheNegotiatedDocs", "off",
27 "$text{'yes'},on", "$text{'no'},off"));
30 sub save_CacheNegotiatedDocs
32 if ($_[0]->{'version'} < 2.0) {
33 return $in{'CacheNegotiatedDocs'} ? ( [ "" ] ) : ( [ ] );
36 return &parse_choice("CacheNegotiatedDocs", "off");
40 sub edit_LanguagePriority
42 return (2, "$text{'mod_negotiation_pri'}",
43 &opt_input($_[0]->{'value'}, "LanguagePriority", "$text{'mod_negotiation_def'}", 40));
45 sub save_LanguagePriority
47 local $rv = &parse_opt("LanguagePriority", '\S', $text{'mod_negotiation_epri'});
49 $rv->[0] =~ s/^"(.*)"/$1/g;