- Timestamp:
- 07/30/19 16:53:04 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r772 r773 4240 4240 " retry $soa{retry}, expire $soa{expire}, minTTL $soa{minttl}, TTL $soa{ttl})"; 4241 4241 } 4242 if ($revrec eq 'y') { 4243 $dbh->do("UPDATE revzones SET changed = 'y',zserial = ? WHERE rdns_id = ?", undef, (scalar(time), $soa{id}) ); 4244 } else { 4245 $dbh->do("UPDATE domains SET changed = 'y',zserial = ? WHERE domain_id = ?", undef, (scalar(time), $soa{id}) ); 4246 } 4242 4247 $logdata{entry} = $msg; 4243 4248 $self->_log(%logdata); … … 4588 4593 $dbh->do("INSERT INTO "._rectable($defrec, $revrec)." ($fields) VALUES ($vallen)", 4589 4594 undef, @vallist); 4595 if ($revrec eq 'y') { 4596 $dbh->do("UPDATE revzones SET changed = 'y',zserial = ? WHERE rdns_id = ?", undef, (scalar(time), $domid) ); 4597 } else { 4598 $dbh->do("UPDATE domains SET changed = 'y',zserial = ? WHERE domain_id = ?", undef, (scalar(time), $domid) ); 4599 } 4590 4600 $self->_log(%logdata); 4591 4601 $dbh->commit; … … 4788 4798 eval { 4789 4799 $dbh->do("UPDATE "._rectable($defrec,$revrec)." SET $fields WHERE record_id=?", undef, (@vallist, $id) ); 4800 if ($revrec eq 'y') { 4801 $dbh->do("UPDATE revzones SET changed = 'y',zserial = ? WHERE rdns_id = ?", undef, (scalar(time), $domid) ); 4802 } else { 4803 $dbh->do("UPDATE domains SET changed = 'y',zserial = ? WHERE domain_id = ?", undef, (scalar(time), $domid) ); 4804 } 4790 4805 $self->_log(%logdata); 4791 4806 $dbh->commit; … … 4853 4868 eval { 4854 4869 $dbh->do("UPDATE records SET $delpar = ?, type = ? WHERE record_id = ?", undef, @sqlargs); 4870 # both forward and reverse zones affected, more or less by definition 4871 $dbh->do("UPDATE revzones SET changed = 'y',zserial = ? WHERE rdns_id = ?", undef, (scalar(time), $rec->{rdns_id}) ); 4872 $dbh->do("UPDATE domains SET changed = 'y',zserial = ? WHERE domain_id = ?", undef, (scalar(time), $rec->{domain_id}) ); 4855 4873 $self->_log(domain_id => $rec->{domain_id}, rdns_id => $rec->{rdns_id}, 4856 4874 group_id => $self->parentID(id => $rec->{rdns_id}, type => 'revzone', revrec => 'y'), … … 4903 4921 4904 4922 eval { 4905 my $sth = $dbh->do("DELETE FROM "._rectable($defrec,$revrec)." WHERE record_id=?", undef, ($id)); 4923 $dbh->do("DELETE FROM "._rectable($defrec,$revrec)." WHERE record_id=?", undef, ($id)); 4924 if ($revrec eq 'y') { 4925 $dbh->do("UPDATE revzones SET changed = 'y',zserial = ? WHERE rdns_id = ?", undef, (scalar(time), $oldrec->{domain_id}) ); 4926 } else { 4927 $dbh->do("UPDATE domains SET changed = 'y',zserial = ? WHERE domain_id = ?", undef, (scalar(time), $oldrec->{rdns_id}) ); 4928 } 4906 4929 $self->_log(%logdata); 4907 4930 $dbh->commit;
Note:
See TracChangeset
for help on using the changeset viewer.