Commit 328af70e authored by Côme Bernigaud's avatar Côme Bernigaud Committed by Benoit Mortier
Browse files

Fixes #3442 Fixed dashboard network tab dns servers links

parent 4b7e4eb4
......@@ -83,8 +83,8 @@ class dashboardNetwork extends simplePlugin
$cn = preg_replace("/^cn=([^,]+),.*$/", "$1", $dn);
if (!isset($servers[$dn])) {
$servers[$dn] = array(
'name' => $cn,
'link' => objects::link($attrs['dn'], 'server', 'service_serviceDNS', $cn, FALSE),
'name' => $cn,
'link' => objects::link($dn, 'server', 'service_serviceDNS', $cn, FALSE),
'zones' => array()
);
}
......@@ -92,8 +92,8 @@ class dashboardNetwork extends simplePlugin
} elseif (preg_match("/^zoneName=/", $dn)) {
$reverseName = preg_replace("/^zoneName=([^,]+),.*$/", "$1", $attrs['dn']);
$zoneName = preg_replace("/^zoneName=([^,]+),.*$/", "$1", $dn);
$dn = preg_replace("/^zoneName=[^,]+,/", "", $dn);
$IP = DNS::FlipIp(str_replace(DNS::getInAddrArpa(), "", $reverseName));
$dn = preg_replace("/^zoneName=[^,]+,/", "", $dn);
$IP = DNS::FlipIp(str_replace(DNS::getInAddrArpa(), "", $reverseName));
for ($dots = count(explode(".", $IP));$dots < 4;$dots++) {
$IP .= ".0";
}
......
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