public function dns_templatezone_add

Discussion in 'Installation/Configuration' started by francoisPE, Jan 20, 2021.

  1. francoisPE

    francoisPE Member HowtoForge Supporter

    Hello,
    I am using ISPconfig 3.2.2, on ubuntu 20.04.
    I have 2 servers : both with perfect server settings. 2 nd server is missor of the first.
    I am writting a API to set up DNS using : "public function dns_templatezone_add"
    I have few remarks on this function :

    - there is no "return " with ID at the end !

    - I face difficulties with $server_id
    Code:
    $server_id = $client["default_dnsserver"];
    For my client 'test', in web interface (Client > LIMITS > DNS SERVER) I set : serv1.domain.tld... = server 1
    For a reason, I ignore, "default_dnsserver" was not 1 but 0. I had to correct it via phpmyadmin in database.
    Moreover, this code made impossible API for admin (Client C0 has no "default_dnsserver )

    I would suggest to set this value directly in input as it is on web interface.
    In other words, function would become
    Code:
    public function dns_templatezone_add($server_id, $session_id, $client_id, $template_id, $domain, $ip, $ns1, $ns2, $email) 
     

Share This Page