Commit 1955d826 authored by Demian's avatar Demian
Browse files

fix checkDomainModuleDomain call on dns zone imports #6345

before we handed over domain_name instead of domain_id to the checkDomainModuleDomain function,
which resulted in nothing. This fixes the call by querying the database for the domain_id for
the given domain_name.
parent 39bf4b24
......@@ -622,7 +622,11 @@ if(isset($_FILES['file']['name']) && is_uploaded_file($_FILES['file']['tmp_name'
$error[] = $wb['zone_file_soa_parser'];
$error[] = print_r( $soa, true );
}
if ($settings['use_domain_module'] == 'y' && ! $app->tools_sites->checkDomainModuleDomain($soa['name']) ) {
$tmp_soa_name = trim($soa['name'], ".");
$tmp_domain_id = $app->db->queryOneRecord('SELECT domain_id FROM domain where domain = ?', $tmp_soa_name);
if ($settings['use_domain_module'] == 'y' && ! $app->tools_sites->checkDomainModuleDomain($tmp_domain_id['domain_id']) ) {
$valid_zone_file = false;
$error[] = $wb['zone_not_allowed'];
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment