|
@@ -124,8 +124,7 @@ function cwp7_ConfigOptions() {
|
|
|
$configOptions['inode'] = array( "Type" => "text" , "Description" => "Max of inode", "Default" => "0",);
|
|
$configOptions['inode'] = array( "Type" => "text" , "Description" => "Max of inode", "Default" => "0",);
|
|
|
$configOptions['nofile'] = array( "Type" => "text", "Description" => "Max of nofile", "Default" => "100",);
|
|
$configOptions['nofile'] = array( "Type" => "text", "Description" => "Max of nofile", "Default" => "100",);
|
|
|
$configOptions['nproc'] = array( "Type" => "text" , "Description" => "Nproc limit - 40 suggested", "Default" => "40",);
|
|
$configOptions['nproc'] = array( "Type" => "text" , "Description" => "Nproc limit - 40 suggested", "Default" => "40",);
|
|
|
- $configOptions['Nameserver IP for lookups'] = array( "Type" => "text" , "Description" => "Name Server IP", "Default" => "185.163.51.142",);
|
|
|
|
|
- $configOptions['Name of own Nameserver'] = array( "Type" => "text" , "Description" => "Name Server Name", "Default" => "ns1.thurdata.ch",);
|
|
|
|
|
|
|
+ $configOptions['Own Nameserver IP'] = array( "Type" => "text" , "Description" => "Own Name Server IP", "Default" => "185.163.51.142",);
|
|
|
return $configOptions;
|
|
return $configOptions;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -328,7 +327,7 @@ function cwp7_ClientArea($params) {
|
|
|
if(cwp7CheckA($domain['domain'],$params['serverip'],$params['configoption5']) == 1) {
|
|
if(cwp7CheckA($domain['domain'],$params['serverip'],$params['configoption5']) == 1) {
|
|
|
$domain['DNS'] = 1;
|
|
$domain['DNS'] = 1;
|
|
|
}
|
|
}
|
|
|
- $domain['domainNS'] = cwp7CheckSOA($domain['domain'],$params['configoption5'],$params['configoption6']);
|
|
|
|
|
|
|
+ $domain['domainNS'] = cwp7CheckSOA($domain['domain'],$params['configoption5']);
|
|
|
$domain['subdomains'] = array();
|
|
$domain['subdomains'] = array();
|
|
|
foreach($subDomains as $subDomain) {
|
|
foreach($subDomains as $subDomain) {
|
|
|
if($subDomain['domain'] == $domain['domain']) {
|
|
if($subDomain['domain'] == $domain['domain']) {
|
|
@@ -1087,7 +1086,7 @@ function cwp7_infoDNS($params) {
|
|
|
if(!filter_var($_POST['d'], FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)){
|
|
if(!filter_var($_POST['d'], FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)){
|
|
|
return 'Error: invalid domain name';
|
|
return 'Error: invalid domain name';
|
|
|
}
|
|
}
|
|
|
- $cwp7nameserver = cwp7CheckSOA($_POST['d'],$params['configoption5'],$params['configoption6']);
|
|
|
|
|
|
|
+ $cwp7nameserver = cwp7CheckSOA($_POST['d'],$params['configoption5']);
|
|
|
return array(
|
|
return array(
|
|
|
'templatefile' => 'cwp7_help_dns',
|
|
'templatefile' => 'cwp7_help_dns',
|
|
|
'vars' => array(
|
|
'vars' => array(
|
|
@@ -1181,7 +1180,7 @@ function cwp7CheckA($host, $serverIP, $nameserverIP, $recurse = 0) {
|
|
|
*
|
|
*
|
|
|
* @return string 'none' -> not registered, 'self' -> registered at own or the name of an other responsible nameserver
|
|
* @return string 'none' -> not registered, 'self' -> registered at own or the name of an other responsible nameserver
|
|
|
*/
|
|
*/
|
|
|
-function cwp7CheckSOA($domain, $nameserverIP, $nameserverName ) {
|
|
|
|
|
|
|
+function cwp7CheckSOA($domain, $nameserverIP) {
|
|
|
$nameserver = array($nameserverIP);
|
|
$nameserver = array($nameserverIP);
|
|
|
# try NS1
|
|
# try NS1
|
|
|
$resolver = new Net_DNS2_Resolver(array('nameservers' => $nameserver));
|
|
$resolver = new Net_DNS2_Resolver(array('nameservers' => $nameserver));
|