Code

Updated opsi activation .
[gosa.git] / gosa-plugins / systems / admin / systems / class_termDNS.inc
index e0a6e7960c7418e96c6cc5186f8f5453671e348b..6fd06d3c602077beda626330b3699d2c0657c0e4 100644 (file)
@@ -184,13 +184,13 @@ class termDNS extends plugin
        over the whole ldap server was 10 to 20 times slower.
      */
     $deps  = array();
-    $ou = preg_replace("/,.*$/","",get_ou("systemsou"));
-    $a_ous = array(get_ou("serverou"),
-                  get_ou("terminalou"),
-                  get_ou("workstationou"),
-                  get_ou("printerou"),
-                  get_ou("phoneou"),
-                  get_ou("componentou"));
+    $ou = preg_replace("/,.*$/","",get_ou("systemRDN"));
+    $a_ous = array(get_ou("serverRDN"),
+                  get_ou("terminalRDN"),
+                  get_ou("workstationRDN"),
+                  get_ou("printerRDN"),
+                  get_ou("phoneRDN"),
+                  get_ou("componentRDN"));
   
     $ldap = $this->config->get_ldap_link();
     $ldap->cd($this->config->current['BASE']);
@@ -254,6 +254,7 @@ class termDNS extends plugin
   {
          /* Call parent execute */
     $smarty= get_smarty();
+    $smarty->assign("autonetACL",$this->acl_is_writeable("macAddress").$this->acl_is_writeable("ipHostNumber"));
 
     $tmp = $this->plInfo();
     foreach($tmp['plProvidedAcls'] as $name => $translation){
@@ -454,6 +455,8 @@ class termDNS extends plugin
       $smarty->assign("changeStateForRecords",$changeStateForRecords);
       $smarty->assign("staticAddress","<font class=\"must\">*</font>");
 
+      $smarty->assign("autonetACL",$this->acl_is_writeable("macAddress").$this->acl_is_writeable("ipHostNumber"));
+
       $display.= $smarty->fetch(get_template_path('network.tpl', TRUE));
     }
 
@@ -1033,7 +1036,7 @@ class termDNS extends plugin
 
   function get_dhcp_parent_node()
   {
-    return(preg_replace("/^cn=".normalizePreg($this->cn).",/","",$this->get_dhcp_host_entry_dn()));
+    return(preg_replace("/^cn=".preg_quote($this->cn, '/').",/","",$this->get_dhcp_host_entry_dn()));
   }
 
 
@@ -1082,7 +1085,7 @@ class termDNS extends plugin
       $tmp = array_flip($this->Zones);
       $tmp = preg_replace("/^[^\/]*+\//","",$tmp[$this->dnsEntry['zoneName']]);
       $tmp = trim(preg_replace("/\.in-addr.arpa$/","",$tmp));
-      $ptr = preg_replace("/^".normalizePreg(DNS::FlipIp($tmp))."\./","",$this->ipHostNumber);
+      $ptr = preg_replace("/^".preg_quote(DNS::FlipIp($tmp), '/')."\./","",$this->ipHostNumber);
       return($ptr);
     }else{
       return(FALSE);
@@ -1109,7 +1112,7 @@ class termDNS extends plugin
     $ret = array();
     foreach($arr as $r => $name){
       $base_part = str_replace($base,"",$r);
-      if(preg_match("/^[a-z]*=".normalizePreg($name)."(|,)$/i",$base_part)){
+      if(preg_match("/^[a-z]*=".preg_quote($name, '/')."(|,)$/i",$base_part)){
         $ret[$r] = $current.$name;
         $tmp = $this->create_tree($arr,$r,$current.".&nbsp;");
         foreach($tmp as $sub_key => $sub_name){