Skip to content
Snippets Groups Projects
Unverified Commit 7e0c8c35 authored by Helmo's avatar Helmo
Browse files

Add ipv6 option for dns_templatezone_add()

parent 2b30a072
No related branches found
No related tags found
No related merge requests found
...@@ -42,7 +42,7 @@ class remoting_dns extends remoting { ...@@ -42,7 +42,7 @@ class remoting_dns extends remoting {
// DNS Function -------------------------------------------------------------------------------------------------- // DNS Function --------------------------------------------------------------------------------------------------
//* Create Zone with Template //* Create Zone with Template
public function dns_templatezone_add($session_id, $client_id, $template_id, $domain, $ip, $ns1, $ns2, $email) { public function dns_templatezone_add($session_id, $client_id, $template_id, $domain, $ip, $ns1, $ns2, $email, $ipv6 = '') {
global $app, $conf; global $app, $conf;
if(!$this->checkPerm($session_id, 'dns_templatezone_add')) { if(!$this->checkPerm($session_id, 'dns_templatezone_add')) {
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
...@@ -63,6 +63,7 @@ class remoting_dns extends remoting { ...@@ -63,6 +63,7 @@ class remoting_dns extends remoting {
$tpl_content = $template_record['template']; $tpl_content = $template_record['template'];
if($domain != '') $tpl_content = str_replace('{DOMAIN}', $domain, $tpl_content); if($domain != '') $tpl_content = str_replace('{DOMAIN}', $domain, $tpl_content);
if($ip != '') $tpl_content = str_replace('{IP}', $ip, $tpl_content); if($ip != '') $tpl_content = str_replace('{IP}', $ip, $tpl_content);
if($ipv6 != '') $tpl_content = str_replace('{IPV6}', $ipv6, $tpl_content);
if($ns1 != '') $tpl_content = str_replace('{NS1}', $ns1, $tpl_content); if($ns1 != '') $tpl_content = str_replace('{NS1}', $ns1, $tpl_content);
if($ns2 != '') $tpl_content = str_replace('{NS2}', $ns2, $tpl_content); if($ns2 != '') $tpl_content = str_replace('{NS2}', $ns2, $tpl_content);
if($email != '') $tpl_content = str_replace('{EMAIL}', $email, $tpl_content); if($email != '') $tpl_content = str_replace('{EMAIL}', $email, $tpl_content);
......
...@@ -32,8 +32,9 @@ try { ...@@ -32,8 +32,9 @@ try {
$ns1 = 'ns1.testhoster.tld'; $ns1 = 'ns1.testhoster.tld';
$ns2 = 'ns2.testhoster.tld'; $ns2 = 'ns2.testhoster.tld';
$email = 'email.test.tld'; $email = 'email.test.tld';
$ipv6 = '2606:2800:220:1:248:1893:25c8:1946';
$id = $client->dns_templatezone_add($session_id, $client_id, $template_id, $domain, $ip, $ns1, $ns2, $email); $id = $client->dns_templatezone_add($session_id, $client_id, $template_id, $domain, $ip, $ns1, $ns2, $email, $ipv6);
echo "ID: ".$id."<br>"; echo "ID: ".$id."<br>";
...@@ -47,4 +48,4 @@ try { ...@@ -47,4 +48,4 @@ try {
die('SOAP Error: '.$e->getMessage()); die('SOAP Error: '.$e->getMessage());
} }
?> ?>
\ No newline at end of file
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