Changeset 866 for trunk/cgi-bin/IPDB.pm


Ignore:
Timestamp:
05/02/16 17:59:07 (9 years ago)
Author:
Kris Deugau
Message:

/trunk

main.cgi:

  • Don't spew warnings and break the UI when retrieval of the zone list for a netblock fails

IPDB.pm, ipdb-rpc.cgi:

  • Fill out rpc_listPool stub in ipdb-rpc.cgi. The first likely consumer may not want the full UI dataset (with description and "deleteme" flag) so the core sub has been extended with an optional flag that defaults to on.

ipdb-rpc.cgi:

  • Correct argument validation in rpc_deleteBlock()
File:
1 edited

Legend:

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

    r862 r866  
    12161216  my $dbh = shift;
    12171217  my $pool = shift;
     1218  my $incdesc = shift;
     1219  $incdesc = 1 if !defined($incdesc);  # extra flag to include description and "deleteme" flag
    12181220
    12191221  my $sth = $dbh->prepare("SELECT ip,custid,available,description,type,id".
     
    12261228        custid => $custid,
    12271229        available => $available,
    1228         desc => $desc,
    1229         delme => $available eq 'n',
    12301230        parent => $pool,
    12311231        id => $id,
    12321232        );
     1233    if ($incdesc) {
     1234      $row{desc} = $desc;
     1235      $row{delme} = ($available eq 'n');
     1236    }
    12331237    push @poolips, \%row;
    12341238  }
Note: See TracChangeset for help on using the changeset viewer.