Private GIT

Skip to content
Snippets Groups Projects
Unverified Commit 8841b69f authored by Miha Petkovsek's avatar Miha Petkovsek Committed by GitHub
Browse files

Merge pull request #2528 from webmeisterei/fix_pdns_domain_for_hostname_pt2

Fix pDNS Domain for Hostname, pt2
parents bd31c999 a86222ee
Branches
No related tags found
No related merge requests found
......@@ -52,13 +52,13 @@ else {
if ($all_domains!==false) {
// Reverse the hostname, this fixes #1471 and #2374
$r_hostname = implode(".", array_reverse(explode(".", $_POST['domain_id'])));
$r_hostdomain = implode(".", array_reverse(array_slice(explode(".", $_POST['domain_id']), 1)));
foreach($all_domains as $dk=>$domain_s) {
// Reverse the domain and compare it reversed, this fixes #1471 and #2374
$r_domain = implode(".", array_reverse(explode(".", $domain_s->name)));
if (substr($r_hostname, 0, strlen($r_domain)) == $r_domain) {
if (substr($r_hostdomain, 0, strlen($r_domain)) == $r_domain) {
$matches[$dk] = $domain_s;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment