Changeset 632 for trunk/cgi-bin


Ignore:
Timestamp:
10/08/14 17:47:56 (10 years ago)
Author:
Kris Deugau
Message:

/trunk

Commit 6/mumble for work done intermittently over the past ~year.
See #5, comment 25:

  • Update IPDB::getMasterList()
  • Update IPDB::getTypeList()
File:
1 edited

Legend:

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

    r630 r632  
    653653  my $stampme = shift || 'm';   # optional but should be set by caller for clarity
    654654
    655   my $mlist = $dbh->selectall_arrayref("SELECT cidr AS master".($stampme eq 'm' ? ',mtime' : '').
    656         " FROM masterblocks ORDER BY cidr", { Slice => {} });
     655  my $mlist = $dbh->selectall_arrayref("SELECT id,vrf,cidr AS master".($stampme eq 'm' ? ',modifystamp AS mtime' : '').
     656        " FROM allocations WHERE type='mm' ORDER BY cidr", { Slice => {} });
    657657  return $mlist;
    658658} # end getMasterList()
     
    682682    $tlist = $dbh->selectall_arrayref("SELECT type,listname FROM alloctypes WHERE listorder <= 500 ".
    683683        " AND (type LIKE '_i' OR type LIKE '_r') ORDER BY listorder", { Slice => {} });
     684  } elsif ($tgroup eq 'i') {
     685    # grouping 'i' - static IP types.
     686    $tlist = $dbh->selectall_arrayref("SELECT type,listname FROM alloctypes WHERE listorder <= 500 ".
     687        " AND type LIKE '_i' ORDER BY listorder", { Slice => {} });
    684688  } else {
    685689    # grouping 'a' - all standard allocation types.  This includes everything
Note: See TracChangeset for help on using the changeset viewer.