strict/warn, define $bconf, remove $view from can_edit_zone call

This commit is contained in:
Joe Cooper
2016-05-30 21:51:51 -07:00
parent b5602d93c6
commit 0a3658400e

View File

@@ -1,22 +1,25 @@
#!/usr/local/bin/perl
# edit_forward.cgi
# Display options for an existing forward zone
use strict;
use warnings;
our (%access, %in, %text);
require './bind8-lib.pl';
&ReadParse();
$in{'view'} = 'any' if ($in{'view'} eq '');
$zone = &get_zone_name_or_error($in{'zone'}, $in{'view'});
$z = &zone_to_config($zone);
$zconf = $z->{'members'};
$dom = $zone->{'name'};
my $zone = &get_zone_name_or_error($in{'zone'}, $in{'view'});
my $z = &zone_to_config($zone);
my $zconf = $z->{'members'};
my $dom = $zone->{'name'};
&can_edit_zone($zone) ||
&error($text{'master_ecannot'});
$dom = $zone->{'name'};
&can_edit_zone($zone, $view) ||
&can_edit_zone($zone) ||
&error($text{'fwd_ecannot'});
$desc = &ip6int_to_net(&arpa_to_ip($dom));
my $desc = &ip6int_to_net(&arpa_to_ip($dom));
&ui_print_header($desc, $text{'fwd_title'}, "",
undef, undef, undef, undef, &restart_links());
@@ -48,6 +51,7 @@ else {
print &ui_buttons_start();
# Move to another view
my $bconf = &get_config();
print &move_zone_button($bconf, $zone->{'viewindex'}, $in{'zone'});
# Delete zone