Changeset 246
- Timestamp:
- 02/27/12 18:04:23 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r244 r246 1801 1801 my $sth = $dbh->prepare($sql); 1802 1802 $sth->execute($id); 1803 ##fixme: stick a flag somewhere if the record doesn't exist. by the API, this is an impossible case, but... 1803 1804 1804 1805 my ($recid,$host,$val,$ttl) = $sth->fetchrow_array() or return; … … 1818 1819 return %ret; 1819 1820 } # end getSOA() 1821 1822 1823 ## DNSDB::updateSOA() 1824 # Update the specified SOA record 1825 # Takes a database handle, default/live flag, forward/reverse flag, and SOA data hash 1826 sub updateSOA { 1827 my $dbh = shift; 1828 my $defrec = shift; 1829 my $reverc = shift; 1830 1831 my %soa = @_; 1832 1833 ##fixme: data validation: make sure {recid} is really the SOA for {parent} 1834 my $sql = "UPDATE "_rectable($defrec, $revrec)." SET host=?, val=?, ttl=? WHERE record_id=? AND type=6"; 1835 $sth = $dbh->prepare($sql); 1836 $sth->execute("$soa{contact}:$soa{prins}", "$soa{refresh}:$soa{retry}:$soa{expire}:$soa{minttl}", 1837 $soa{ttl}, $soa{recid}); 1838 1839 } # end updateSOA() 1820 1840 1821 1841
Note:
See TracChangeset
for help on using the changeset viewer.