Get All DNS Zones Templates from Remote Api
Hi, I'm using remote api to create some things. I could not find a function to get all DNS zones templates in remote API functions, then I created the function below and inserts in /interface/lib/classes/remoting.inc.php around line 2465 (inside DNS Function section)
If there is no other way to get all DNS templates, would be great if you can insert it natively for don't loose the function every time that upgrade ISPConfig and all can use it.
//* 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;
}
}