From 6f7cff40f73ff9c59b78ca6a6ea3a0f98d674b3e Mon Sep 17 00:00:00 2001 From: thom <thom@amsterdamtech.nl> Date: Sun, 14 Jun 2020 17:08:25 +0200 Subject: [PATCH] Add get template function (#3635) --- interface/lib/classes/remote.d/dns.inc.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/interface/lib/classes/remote.d/dns.inc.php b/interface/lib/classes/remote.d/dns.inc.php index 4bf6906147..9b5e6b74ad 100644 --- a/interface/lib/classes/remote.d/dns.inc.php +++ b/interface/lib/classes/remote.d/dns.inc.php @@ -736,6 +736,24 @@ class remoting_dns extends remoting { + //* Get All DNS Zones Templates by etruel + public function dns_templatezone_get_all($session_id) { + global $app, $conf; + if(!$this->checkPerm($session_id, 'dns_templatezone_add')) { + $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + $sql ="SELECT * FROM dns_template"; + $result = $app->db->queryAllRecords($sql); + if(isset($result)) { + return $result; + } + else { + this->server->fault('template_id_error', 'There is no DNS templates.'); + return false; + } + } + /** * Get all dns records for a zone * @param int session id -- GitLab