mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-06-07 00:47:00 +03:00
We can now import, create AND delete zones
This commit is contained in:
parent
c8774fc05e
commit
2cc92e6842
2 changed files with 37 additions and 39 deletions
|
@ -12,6 +12,7 @@ class Zone {
|
|||
$this->soa_edit_api = '';
|
||||
$this->keyinfo = '';
|
||||
$this->account = '';
|
||||
$this->zone = false;
|
||||
$this->nameservers = Array();
|
||||
$this->rrsets = Array();
|
||||
$this->masters = Array();
|
||||
|
@ -49,6 +50,10 @@ class Zone {
|
|||
}
|
||||
}
|
||||
|
||||
public function importdata($data) {
|
||||
$this->zone = $data;
|
||||
}
|
||||
|
||||
public function setkeyinfo($info) {
|
||||
$this->keyinfo = $info;
|
||||
}
|
||||
|
@ -162,21 +167,24 @@ class Zone {
|
|||
public function export() {
|
||||
$ret = Array();
|
||||
$ret['account'] = $this->account;
|
||||
$ret['nameservers'] = $this->nameservers;
|
||||
$ret['kind'] = $this->kind;
|
||||
$ret['name'] = $this->name;
|
||||
$ret['soa_edit'] = $this->soa_edit;
|
||||
$ret['soa_edit_api'] = $this->soa_edit_api;
|
||||
if ($this->zone) {
|
||||
$ret['zone'] = $this->zone;
|
||||
return $ret;
|
||||
}
|
||||
|
||||
$ret['dnssec'] = $this->dnssec;
|
||||
if ($this->dnssec) {
|
||||
$ret['keyinfo'] = $this->keyinfo;
|
||||
}
|
||||
$ret['id'] = $this->id;
|
||||
$ret['kind'] = $this->kind;
|
||||
$ret['masters'] = $this->masters;
|
||||
$ret['name'] = $this->name;
|
||||
if (count($this->nameservers) > 0) {
|
||||
$ret['nameservers'] = $this->nameservers;
|
||||
}
|
||||
$ret['rrsets'] = $this->export_rrsets();
|
||||
$ret['serial'] = $this->serial;
|
||||
$ret['soa_edit'] = $this->soa_edit;
|
||||
$ret['soa_edit_api'] = $this->soa_edit_api;
|
||||
$ret['url'] = $this->url;
|
||||
|
||||
return $ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue