From: hickert Date: Mon, 22 Mar 2010 10:20:19 +0000 (+0000) Subject: Maded dns plugin w3c conform and fixed acl checks X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a9da035af76d4483ddb3a1979babfc7697a45115;p=gosa.git Maded dns plugin w3c conform and fixed acl checks git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16984 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZoneEntries.inc b/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZoneEntries.inc index 999e69861..164bc4871 100644 --- a/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZoneEntries.inc +++ b/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZoneEntries.inc @@ -90,10 +90,10 @@ class servDNSeditZoneEntries extends plugin foreach($_POST as $name => $value){ - /* Add a new Record in given object + /* Extract informations out of post name */ - $tmp = preg_replace("/^.*_(.*)$/","\\1",$name); - $tmp2 = explode("|",$tmp); + $tmp = preg_replace("/^[^_]*_/","\\1",$name); + $tmp2 = explode("|",postDecode($tmp)); /* Add new host entry */ @@ -108,7 +108,7 @@ class servDNSeditZoneEntries extends plugin if(count($tmp2) != 2) continue; - $Name = postDecode($tmp2[0]); + $Name = $tmp2[0]; $RecordID = $tmp2[1]; /* Add new REcord @@ -146,13 +146,12 @@ class servDNSeditZoneEntries extends plugin /* Extract informations out of post name */ - $tmp = preg_replace("/^.*_/","\\1",$name); - $tmp2 = explode("|",$tmp); + $tmp = preg_replace("/^[^_]*_/","\\1",$name); + $tmp2 = explode("|",postDecode($tmp)); if(count($tmp2) != 2) continue; - $Name = postDecode($tmp2[0]); - + $Name = $tmp2[0]; $RecordID = $tmp2[1]; /* Check for value change @@ -204,12 +203,12 @@ class servDNSeditZoneEntries extends plugin /* Extract informations out of post name */ - $tmp = preg_replace("/^.*_/","\\1",$name); - $tmp2 = explode("|",$tmp); - + $tmp = preg_replace("/^[^_]*_/","\\1",$name); + $tmp2 = explode("|",postDecode($tmp)); + if(count($tmp2) != 2) continue; - $Name = postDecode($tmp2[0]); + $Name = $tmp2[0]; $RecordID = $tmp2[1]; /* Host renamed @@ -430,7 +429,7 @@ class servDNSeditZoneEntries extends plugin /* Walk through all defined records */ - $str.= ""; + $str.= "
"; foreach($obj['RECORDS'] as $id => $record){ /* Skip not selectable entries */ @@ -440,7 +439,7 @@ class servDNSeditZoneEntries extends plugin /* Create unique post name */ - $name = postEncode($objKey)."|".$id; + $name = postEncode($objKey."|".$id); /* Only first host entry name should be editable */