Changeset 784 for trunk/cgi-bin


Ignore:
Timestamp:
10/08/15 17:21:20 (9 years ago)
Author:
Kris Deugau
Message:

/trunk

Update getBlockData() to retrieve backup data if present. See #52.

File:
1 edited

Legend:

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

    r782 r784  
    30143014  my $commonfields = q(custid, type, circuitid, description, notes, modifystamp AS lastmod,
    30153015        privdata, vlan, rdns);
     3016  my $bkfields = q(b.backup_id AS hasbk, b.bkbrand, b.bkmodel, b.bktype, b.bkport, b.bksrc,
     3017        b.bkuser, b.bkvpass, b.bkepass);
    30163018
    30173019  if ($type eq 'i') {
    30183020    my $binfo = $dbh->selectrow_hashref(qq(
    30193021        SELECT p.id, p.ip AS block, p.city, p.vrf, p.parent_id, p.master_id, $commonfields,
    3020                 d.zone >> p.ip AS revavail
     3022                d.zone >> p.ip AS revavail,
     3023                $bkfields
    30213024        FROM poolips p
    30223025        LEFT JOIN dnsavail d ON p.master_id = d.parent_alloc AND p.ip << d.zone
     3026        LEFT JOIN backuplist b ON p.backup_id = b.backup_id
    30233027        WHERE id = ?
    30243028        ), undef, ($id) );
     
    30343038        WHERE a.id = ?
    30353039        ), undef, ($id) );
     3040
    30363041    return $binfo;
    30373042  }
Note: See TracChangeset for help on using the changeset viewer.