Rebuild listrecords and fake records by merging them with rrsets in Zone.php

This commit is contained in:
Mark Schouten 2016-08-03 14:16:07 +02:00
parent a94d0e0b31
commit 6fd7087dc9
2 changed files with 29 additions and 13 deletions

View file

@ -215,6 +215,21 @@ class RRSet {
array_push($this->comments, $comment);
}
public function rrsets2records() {
$ret = Array();
foreach ($this->rrsets as $rrset) {
foreach ($rrset->export_records() as $record) {
$record['name'] = $rrset['name'];
$record['ttl'] = $rrset['ttl'];
$record['type'] = $rrset['type'];
}
array_push($ret, $record);
}
return $ret;
}
public function export() {
$ret = Array();
$ret['comments'] = $this->export_comments();