Changeset 816


Ignore:
Timestamp:
03/10/16 15:07:44 (9 years ago)
Author:
Kris Deugau
Message:

/trunk

Add getVRF() to retrieve default location for the add new master page. See #54.

Location:
trunk/cgi-bin
Files:
2 edited

Legend:

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

    r815 r816  
    675675  return ('OK',$newvrf);
    676676} # end addVRF()
     677
     678
     679## IPDB::getVRF()
     680# Retrieve additional fields from DB for a VRF
     681sub getVRF {
     682  my $dbh = shift;
     683  my $vrf = shift;
     684
     685  return $dbh->selectrow_hashref("SELECT comment,location FROM vrfs WHERE vrf = ?", {Slice=>{}}, $vrf);
     686} # end getVRF()
    677687
    678688
  • trunk/cgi-bin/main.cgi

    r815 r816  
    154154  }
    155155
     156  my $vrf = getVRF($ip_dbh, $webvar{vrf});
     157
    156158  # Retrieve the list of DNS locations if we've got a place to grab them from
    157159  if ($IPDB::rpc_url) {
     
    159161        rpcuser => $authuser,
    160162        group => 1,     # bleh
    161         defloc => '',
     163        defloc => $vrf->{location},
    162164        );
    163165    my $result = IPDB::_rpc('getLocDropdown', %rpcargs);
Note: See TracChangeset for help on using the changeset viewer.