Changeset 726 for trunk


Ignore:
Timestamp:
05/20/15 15:52:19 (9 years ago)
Author:
Kris Deugau
Message:

/trunk

(Re)?add the block ID back to the hashref returned by getBlockData(),
since there are in fact cases where we may pass the hashref around and
lose track of the original ID.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cgi-bin/IPDB.pm

    r725 r726  
    23212321  if ($type eq 'i') {
    23222322    my $binfo = $dbh->selectrow_hashref(qq(
    2323         SELECT ip AS block, city, vrf, parent_id, master_id, $commonfields
     2323        SELECT id, ip AS block, city, vrf, parent_id, master_id, $commonfields
    23242324        FROM poolips WHERE id = ?
    23252325        ), undef, ($id) );
     
    23272327  } else {
    23282328    my $binfo = $dbh->selectrow_hashref(qq(
    2329         SELECT a.cidr AS block, a.city, a.vrf, a.parent_id, a.master_id, swip, $commonfields,
     2329        SELECT a.id, a.cidr AS block, a.city, a.vrf, a.parent_id, a.master_id, swip, $commonfields,
    23302330                f.cidr AS reserve, f.id as reserve_id
    23312331        FROM allocations a LEFT JOIN freeblocks f ON a.id=f.reserve_for
Note: See TracChangeset for help on using the changeset viewer.