Changeset 808 for trunk/cgi-bin/IPDB.pm
- Timestamp:
- 03/08/16 13:16:44 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/IPDB.pm
r806 r808 1391 1391 sub getBreadCrumbs { 1392 1392 my $dbh = shift; 1393 my $parent = shift; 1393 my $parent = shift || 0; 1394 my $vrf = shift; # if we're not browsing into netblocks yet, caller can pass the VRF for breadcrumbs 1394 1395 my @result; 1395 1396 1396 my $sth = $dbh-> prepare("SELECT cidr,type,id,parent_id FROM allocations WHERE id=?");1397 my $sth = $dbh-> prepare("SELECT cidr,type,id,parent_id,vrf FROM allocations WHERE id=?"); 1397 1398 1398 1399 while ($parent != 0) { 1399 1400 $sth->execute($parent); 1400 my ($cidr,$type,$id,$pid) = $sth->fetchrow_array; 1401 push @result, {cidr => $cidr, link => $id, ispool => ($type =~ /^.[dp]$/ ? 1 : 0)}; 1401 my ($cidr,$type,$id,$pid,$bvrf) = $sth->fetchrow_array; 1402 $vrf = $bvrf; 1403 push @result, { cidr => $cidr, link => $id, ispool => ($type =~ /^.[dp]$/ ? 1 : 0) }; 1402 1404 $parent = $pid; 1403 1405 } 1404 1406 1407 push @result, { cidr => "vrf:$vrf", link => $vrf, isvrf => 1 } 1408 if $vrf; 1409 1405 1410 return \@result; 1406 } # end getBread ()1411 } # end getBreadCrumbs() 1407 1412 1408 1413
Note:
See TracChangeset
for help on using the changeset viewer.