Changeset 815 for trunk/cgi-bin
- Timestamp:
- 03/09/16 17:25:26 (9 years ago)
- Location:
- trunk/cgi-bin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/IPDB.pm
r814 r815 703 703 eval { 704 704 # First check - does the master exist? Ignore VRFs until we can see a sane UI 705 my ($mcontained) = $dbh->selectrow_array("SELECT cidr FROM allocations WHERE cidr >>= ? AND type = 'mm' ",706 undef, ($cidr ) );705 my ($mcontained) = $dbh->selectrow_array("SELECT cidr FROM allocations WHERE cidr >>= ? AND type = 'mm' AND vrf = ?", 706 undef, ($cidr, $args{vrf}) ); 707 707 die "Master block $mcontained already exists and entirely contains $cidr\n" 708 708 if $mcontained; 709 709 710 710 # Second check - does the new master contain an existing one or ones? 711 my ($mexist) = $dbh->selectrow_array("SELECT cidr FROM allocations WHERE cidr <<= ? AND type = 'mm' ",712 undef, ($cidr ) );711 my ($mexist) = $dbh->selectrow_array("SELECT cidr FROM allocations WHERE cidr <<= ? AND type = 'mm' AND vrf = ?", 712 undef, ($cidr, $args{vrf}) ); 713 713 714 714 if (!$mexist) { -
trunk/cgi-bin/main.cgi
r813 r815 165 165 } 166 166 167 # we don't have a netblock; pass 0 for the block ID 168 # Tree navigation 169 my $crumbs = getBreadCrumbs($ip_dbh, 0, $webvar{vrf}); 170 my @rcrumbs = reverse (@$crumbs); 171 $utilbar->param(breadcrumb => \@rcrumbs); 172 173 $page->param(vrf => $webvar{vrf}); 174 167 175 } elsif ($webvar{action} eq 'newmaster') { 168 176 … … 188 196 syslog "info", "$authuser added master block $webvar{cidr}"; 189 197 } 198 199 # we don't have a netblock; pass 0 for the block ID 200 # Tree navigation 201 my $crumbs = getBreadCrumbs($ip_dbh, 0, $webvar{vrf}); 202 my @rcrumbs = reverse (@$crumbs); 203 $utilbar->param(breadcrumb => \@rcrumbs); 190 204 191 205 } # ACL check
Note:
See TracChangeset
for help on using the changeset viewer.