mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-05-06 22:32:22 +03:00
Fix typo and move function to correct class
This commit is contained in:
parent
6fd7087dc9
commit
a7d3e6e6eb
2 changed files with 16 additions and 16 deletions
|
@ -144,6 +144,21 @@ class Zone {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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() {
|
public function export() {
|
||||||
$ret = Array();
|
$ret = Array();
|
||||||
$ret['account'] = $this->account;
|
$ret['account'] = $this->account;
|
||||||
|
@ -215,21 +230,6 @@ class RRSet {
|
||||||
array_push($this->comments, $comment);
|
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() {
|
public function export() {
|
||||||
$ret = Array();
|
$ret = Array();
|
||||||
$ret['comments'] = $this->export_comments();
|
$ret['comments'] = $this->export_comments();
|
||||||
|
|
|
@ -307,7 +307,7 @@ case "listslaves":
|
||||||
|
|
||||||
case "listrecords":
|
case "listrecords":
|
||||||
$zonedata = $api->loadzone($_GET['zoneid']);
|
$zonedata = $api->loadzone($_GET['zoneid']);
|
||||||
$zone = new Zone()
|
$zone = new Zone();
|
||||||
$zone->parse($zonedata);
|
$zone->parse($zonedata);
|
||||||
$records = $zone->rrsets2records();
|
$records = $zone->rrsets2records();
|
||||||
foreach ($records as &$record) {
|
foreach ($records as &$record) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue