From 15982801cac42639d3a2ddf794c176f184fc5741 Mon Sep 17 00:00:00 2001 From: sebastianm Date: Fri, 20 May 2011 07:45:13 +0000 Subject: [PATCH] Added function dns_rr_get_all_by_zone to remoting lib. Get all dns records for a zone. --- interface/lib/classes/remoting.inc.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/interface/lib/classes/remoting.inc.php b/interface/lib/classes/remoting.inc.php index 8c71b9bef7..5e9e45d472 100644 --- a/interface/lib/classes/remoting.inc.php +++ b/interface/lib/classes/remoting.inc.php @@ -2543,7 +2543,23 @@ class remoting { return false; } - + /** + * Get all dns records for a zone + * @param int session id + * @param int dns zone id + * @author Sebastian Mogilowski 2011 + */ + public function dns_rr_get_all_by_zone($session_id, $zone_id) { + global $app; + if(!$this->checkPerm($session_id, 'dns_zone_get')) { + $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + $sql = "SELECT * FROM dns_rr WHERE zone = ".intval($zone_id);; + $result = $app->db->queryAllRecords($sql); + return $result; + } + /** * Changes DNS zone status * @param int session id -- GitLab