|
1 | 1 | <?php |
2 | 2 |
|
3 | 3 | /* |
4 | | -Copyright (c) 2007 - 2013, Till Brehm, projektfarm Gmbh |
| 4 | +Copyright (c) 2007 - 2016, Till Brehm, projektfarm Gmbh |
5 | 5 | All rights reserved. |
6 | 6 |
|
7 | 7 | Redistribution and use in source and binary forms, with or without modification, |
@@ -196,6 +196,37 @@ public function dns_zone_get($session_id, $primary_id) |
196 | 196 | $app->remoting_lib->loadFormDef('../dns/form/dns_soa.tform.php'); |
197 | 197 | return $app->remoting_lib->getDataRecord($primary_id); |
198 | 198 | } |
| 199 | + |
| 200 | + //* Add a slave zone |
| 201 | + public function dns_slave_add($session_id, $client_id, $params) |
| 202 | + { |
| 203 | + if(!$this->checkPerm($session_id, 'dns_zone_add')) { |
| 204 | + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); |
| 205 | + return false; |
| 206 | + } |
| 207 | + return $this->insertQuery('../dns/form/dns_slave.tform.php', $client_id, $params); |
| 208 | + } |
| 209 | + |
| 210 | + //* Update a slave zone |
| 211 | + public function dns_slave_update($session_id, $client_id, $primary_id, $params) |
| 212 | + { |
| 213 | + if(!$this->checkPerm($session_id, 'dns_zone_update')) { |
| 214 | + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); |
| 215 | + return false; |
| 216 | + } |
| 217 | + $affected_rows = $this->updateQuery('../dns/form/dns_slave.tform.php', $client_id, $primary_id, $params); |
| 218 | + return $affected_rows; |
| 219 | + } |
| 220 | + |
| 221 | + //* Delete a slave zone |
| 222 | + public function dns_slave_delete($session_id, $primary_id) |
| 223 | + { |
| 224 | + if(!$this->checkPerm($session_id, 'dns_zone_delete')) { |
| 225 | + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); |
| 226 | + return false; |
| 227 | + } |
| 228 | + return $this->deleteQuery('../dns/form/dns_slave.tform.php', $primary_id); |
| 229 | + } |
199 | 230 |
|
200 | 231 | //* Get record id by origin |
201 | 232 | public function dns_zone_get_id($session_id, $origin) |
|
0 commit comments