mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-04-19 20:09:14 +03:00
Merge pull request #169 from tuxis-ie/revert-166-master
Revert "notify pdns after zone update"
This commit is contained in:
commit
77d7c50110
3 changed files with 1 additions and 19 deletions
|
@ -84,14 +84,6 @@ class PdnsAPI {
|
|||
|
||||
return $this->loadzone($zone['id']);
|
||||
}
|
||||
public function notifyzone($zoneid) {
|
||||
$api = clone $this->http;
|
||||
$api->method = 'PUT';
|
||||
$api->url = "/servers/localhost/zones/$zoneid/notify";
|
||||
$api->call();
|
||||
|
||||
return $api->json;
|
||||
}
|
||||
|
||||
public function deletezone($zoneid) {
|
||||
$api = clone $this->http;
|
||||
|
|
|
@ -9,7 +9,6 @@ $allowzoneadd = FALSE; # Allow normal users to add zones
|
|||
$logging = TRUE;
|
||||
$allowclearlogs = TRUE; # Allow clearing of log entries
|
||||
$allowrotatelogs = FALSE;# Allow rotation to text file on server
|
||||
$notifyafterupdate = TRUE;# send notify to slaves after zone update
|
||||
|
||||
# Log directory - if allowrotatelogs is set, this is where the logs will
|
||||
# be written. It must be writeable by the web server user.
|
||||
|
|
|
@ -304,7 +304,6 @@ case "create":
|
|||
}
|
||||
|
||||
$api->savezone($zone->export());
|
||||
if ($notifyafterupdate) $api->notifyzone($_GET['zoneid']);
|
||||
|
||||
$zone = new Zone();
|
||||
$zone->parse($api->loadzone($zonename));
|
||||
|
@ -329,7 +328,6 @@ case "create":
|
|||
}
|
||||
}
|
||||
$api->savezone($zone->export());
|
||||
if ($notifyafterupdate) $api->notifyzone($_GET['zoneid']);
|
||||
|
||||
foreach ($template['records'] as $record) {
|
||||
$name = $record['name'] != '' ? join(Array($record['name'],'.',$zonename)) : $zonename;
|
||||
|
@ -342,7 +340,6 @@ case "create":
|
|||
}
|
||||
|
||||
$zone = $api->savezone($zone->export());
|
||||
if ($notifyafterupdate) $api->notifyzone($_GET['zoneid']);
|
||||
writelog("Created zone ".$zone['name']);
|
||||
jtable_respond($zone, 'single');
|
||||
break;
|
||||
|
@ -373,7 +370,6 @@ case "update":
|
|||
|
||||
writelog("Updated zone ".$zone->name);
|
||||
jtable_respond($api->savezone($zone->export()), 'single');
|
||||
if ($notifyafterupdate) $api->notifyzone($_GET['zoneid']);
|
||||
break;
|
||||
|
||||
case "createrecord":
|
||||
|
@ -415,7 +411,6 @@ case "createrecord":
|
|||
|
||||
$record = $zone->addRecord($name, $type, $content, $_POST['disabled'], $_POST['ttl'], $_POST['setptr']);
|
||||
$api->savezone($zone->export());
|
||||
if ($notifyafterupdate) $api->notifyzone($_GET['zoneid']);
|
||||
|
||||
writelog("Created record: ".$record['id']);
|
||||
jtable_respond($record, 'single');
|
||||
|
@ -441,7 +436,6 @@ case "editrecord":
|
|||
$zone->addRecord($_POST['name'], $_POST['type'], $content, $_POST['disabled'], $_POST['ttl'], $_POST['setptr']);
|
||||
|
||||
$api->savezone($zone->export());
|
||||
if ($notifyafterupdate) $api->notifyzone($_GET['zoneid']);
|
||||
|
||||
$record = $zone->getRecord($_POST['name'], $_POST['type'], $content);
|
||||
writelog("Updated record ".$_POST['id']." to ".$record['id']);
|
||||
|
@ -459,7 +453,6 @@ case "deleterecord":
|
|||
$rrset->deleteRecord($old_record['content']);
|
||||
|
||||
$api->savezone($zone->export());
|
||||
if ($notifyafterupdate) $api->notifyzone($_GET['zoneid']);
|
||||
|
||||
writelog("Deleted record ".$_POST['id']);
|
||||
jtable_respond(null, 'delete');
|
||||
|
@ -493,7 +486,6 @@ case "clone":
|
|||
$srczone->setKind($_POST['kind']);
|
||||
|
||||
$zone = $api->savezone($srczone->export());
|
||||
if ($notifyafterupdate) $api->notifyzone($_GET['zoneid']);
|
||||
|
||||
$srczone->parse($zone);
|
||||
|
||||
|
@ -512,7 +504,6 @@ case "clone":
|
|||
}
|
||||
|
||||
$zone = $api->savezone($srczone->export());
|
||||
if ($notifyafterupdate) $api->notifyzone($_GET['zoneid']);
|
||||
|
||||
writelog("Cloned zone $src into $name");
|
||||
jtable_respond($zone, 'single');
|
||||
|
|
Loading…
Add table
Reference in a new issue