Skip to content
Snippets Groups Projects
Commit 6f7cff40 authored by Thom's avatar Thom :tools:
Browse files

Add get template function (#3635)

parent 59f88481
No related branches found
No related tags found
1 merge request!1021DNS additions
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment