Skip to content

Commit 6f7cff4

Browse files
author
thom
committed
Add get template function (#3635)
1 parent 59f8848 commit 6f7cff4

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

interface/lib/classes/remote.d/dns.inc.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,24 @@ public function dns_zone_get_by_user($session_id, $client_id, $server_id) {
736736

737737

738738

739+
//* Get All DNS Zones Templates by etruel
740+
public function dns_templatezone_get_all($session_id) {
741+
global $app, $conf;
742+
if(!$this->checkPerm($session_id, 'dns_templatezone_add')) {
743+
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
744+
return false;
745+
}
746+
$sql ="SELECT * FROM dns_template";
747+
$result = $app->db->queryAllRecords($sql);
748+
if(isset($result)) {
749+
return $result;
750+
}
751+
else {
752+
this->server->fault('template_id_error', 'There is no DNS templates.');
753+
return false;
754+
}
755+
}
756+
739757
/**
740758
* Get all dns records for a zone
741759
* @param int session id

0 commit comments

Comments
 (0)