Skip to content

Commit 7e0c8c3

Browse files
committed
Add ipv6 option for dns_templatezone_add()
1 parent 2b30a07 commit 7e0c8c3

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class remoting_dns extends remoting {
4242
// DNS Function --------------------------------------------------------------------------------------------------
4343

4444
//* Create Zone with Template
45-
public function dns_templatezone_add($session_id, $client_id, $template_id, $domain, $ip, $ns1, $ns2, $email) {
45+
public function dns_templatezone_add($session_id, $client_id, $template_id, $domain, $ip, $ns1, $ns2, $email, $ipv6 = '') {
4646
global $app, $conf;
4747
if(!$this->checkPerm($session_id, 'dns_templatezone_add')) {
4848
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
@@ -63,6 +63,7 @@ public function dns_templatezone_add($session_id, $client_id, $template_id, $dom
6363
$tpl_content = $template_record['template'];
6464
if($domain != '') $tpl_content = str_replace('{DOMAIN}', $domain, $tpl_content);
6565
if($ip != '') $tpl_content = str_replace('{IP}', $ip, $tpl_content);
66+
if($ipv6 != '') $tpl_content = str_replace('{IPV6}', $ipv6, $tpl_content);
6667
if($ns1 != '') $tpl_content = str_replace('{NS1}', $ns1, $tpl_content);
6768
if($ns2 != '') $tpl_content = str_replace('{NS2}', $ns2, $tpl_content);
6869
if($email != '') $tpl_content = str_replace('{EMAIL}', $email, $tpl_content);

remoting_client/examples/dns_templatezone_add.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@
3232
$ns1 = 'ns1.testhoster.tld';
3333
$ns2 = 'ns2.testhoster.tld';
3434
$email = 'email.test.tld';
35+
$ipv6 = '2606:2800:220:1:248:1893:25c8:1946';
3536

36-
$id = $client->dns_templatezone_add($session_id, $client_id, $template_id, $domain, $ip, $ns1, $ns2, $email);
37+
$id = $client->dns_templatezone_add($session_id, $client_id, $template_id, $domain, $ip, $ns1, $ns2, $email, $ipv6);
3738

3839
echo "ID: ".$id."<br>";
3940

@@ -47,4 +48,4 @@
4748
die('SOAP Error: '.$e->getMessage());
4849
}
4950

50-
?>
51+
?>

0 commit comments

Comments
 (0)