Handle hostnames with upper-case letters
[webmin.git] / bind8 / save_forward.cgi
1 #!/usr/local/bin/perl
2 # save_forward.cgi
3 # Save changes to forward zone options in named.conf
4
5 require './bind8-lib.pl';
6 &ReadParse();
7 $conf = &get_config();
8 if ($in{'view'} ne '') {
9         $view = $conf->[$in{'view'}];
10         $conf = $view->{'members'};
11         $indent = 2;
12         }
13 else {
14         $indent = 1;
15         }
16 $zconf = $conf->[$in{'index'}];
17 &lock_file(&make_chroot($zconf->{'file'}));
18 &error_setup($text{'fwd_err'});
19 &can_edit_zone($zconf, $view) ||
20         &error($text{'fwd_ecannot'});
21 $access{'ro'} && &error($text{'master_ero'});
22
23 &save_forwarders("forwarders", $zconf, $indent);
24 &save_choice("check-names", $zconf, $indent);
25 &save_choice("forward", $zconf, $indent);
26 &flush_file_lines();
27 &unlock_file(&make_chroot($zconf->{'file'}));
28 &webmin_log("opts", undef, $zconf->{'value'}, \%in);
29 &redirect("");
30