mds/app-admin/mmc-web-network/files/mmc-web-network-2.3.2-powerdns-1.patch
geos_one cbf2337d54 add powerdens
git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/mds@906 6952d904-891a-0410-993b-d76249ca496b
2009-03-30 11:14:02 +00:00

71 lines
3.0 KiB
Diff

Submitted By: Mario Fetka (mario dot fetka at gmail dot com)
Date: 2009-03-30
Initial Package Version: 2.3.2
Origin: http://mds.mandriva.org/ticket/244
Upstream Status: accepted
Description: add PowerDNS support to mmc
diff -Naur mmc-web-network-2.3.2.orig/network/network/ajaxZoneFilter.php mmc-web-network-2.3.2/network/network/ajaxZoneFilter.php
--- mmc-web-network-2.3.2.orig/network/network/ajaxZoneFilter.php 2007-11-15 14:29:44.000000000 +0000
+++ mmc-web-network-2.3.2/network/network/ajaxZoneFilter.php 2009-03-30 10:10:41.062435101 +0000
@@ -11,7 +11,11 @@
$count = array();
foreach(getZones($filter) as $dn => $entry) {
- $zonename = $entry[1]["zoneName"][0];
+ if (in_array("associatedDomain",array_keys($entry[1]))) {
+ $zonename = $entry[1]["associatedDomain"][0];
+ } else {
+ $zonename = $entry[1]["zoneName"][0];
+ }
$zones[$zonename] = array();
$zones[$zonename]["description"] = "";
if (isset($entry[1]["tXTRecord"])) {
diff -Naur mmc-web-network-2.3.2.orig/network/network/ajaxZoneMembersFilter.php mmc-web-network-2.3.2/network/network/ajaxZoneMembersFilter.php
--- mmc-web-network-2.3.2.orig/network/network/ajaxZoneMembersFilter.php 2007-11-30 15:08:09.000000000 +0000
+++ mmc-web-network-2.3.2/network/network/ajaxZoneMembersFilter.php 2009-03-30 10:10:41.062435101 +0000
@@ -15,7 +15,11 @@
/* Build a $hostname => IP array using A record only */
$records = array();
foreach($rrs as $dn => $entry) {
- $hostname = $entry[1]["relativeDomainName"][0];
+ if (in_array("associatedDomain",array_keys($entry[1]))) {
+ $hostname = $entry[1]["associatedDomain"][0];
+ } else {
+ $hostname = $entry[1]["zoneName"][0];
+ }
if (isset($entry[1]["aRecord"])) {
$address = ip2long($entry[1]["aRecord"][0]);
$records[$hostname] = $address;
@@ -24,7 +28,11 @@
/* Complete the array using CNAME entries */
$cnames = array();
foreach($rrs as $dn => $entry) {
- $alias = $entry[1]["relativeDomainName"][0];
+ if (in_array("associatedDomain",array_keys($entry[1]))) {
+ $alias = $entry[1]["associatedDomain"][0];
+ } else {
+ $alias = $entry[1]["zoneName"][0];
+ }
if (isset($entry[1]["cNAMERecord"])) {
$cname = $entry[1]["cNAMERecord"][0];
$records[$alias] = $records[$cname];
@@ -80,4 +88,4 @@
$n->addActionItemArray($actionsDel);
$n->display();
-?>
\ No newline at end of file
+?>
diff -Naur mmc-web-network-2.3.2.orig/network/network/edithost.php mmc-web-network-2.3.2/network/network/edithost.php
--- mmc-web-network-2.3.2.orig/network/network/edithost.php 2008-12-10 15:13:01.000000000 +0000
+++ mmc-web-network-2.3.2/network/network/edithost.php 2009-03-30 10:10:41.062435101 +0000
@@ -89,6 +89,7 @@
if ($_GET["action"] == "edithost") {
$hostname = $_GET["host"];
+ $hostname = str_replace('.' . $zone, '', $hostname);
$data = getResourceRecord($zone, $hostname);
if (empty($data)) die("Record $hostname does not exist.");
else if (isset($data[0][1]["aRecord"])) {