Code

Removed a couple of normalize_preg calls
[gosa.git] / gosa-plugins / goto / admin / applications / class_applicationGeneric.inc
index 79e6b57fd1ed008c6d8c2ee94f93cadcfdabc5de..f8364a09999fc3dd0ae42a310269a1fce468605c 100644 (file)
@@ -57,7 +57,7 @@ class application extends plugin
         $this->base= dn2base($ui->dn);
       }
     } else {
-      $this->base= preg_replace ("/^[^,]+,".get_ou('applicationou')."/", "", $this->dn);
+      $this->base= preg_replace ("/^[^,]+,".get_ou('applicationRDN')."/", "", $this->dn);
     }
 
     $this->orig_cn = $this->cn;
@@ -229,7 +229,7 @@ class application extends plugin
     restore_error_handler();
 
     /* Parse release out of object dn */
-    $release = preg_replace("/".get_ou("applicationou").normalizePreg($this->base)."$/","",$this->dn);
+    $release = preg_replace("/".get_ou("applicationRDN").preg_quote($this->base)."$/","",$this->dn);
     $release = preg_replace("/^cn=[^,]+,/","",$release);
 
     /* Get a list of all groups 
@@ -249,7 +249,7 @@ class application extends plugin
       $ldap->cd($release.$group);
       $ldap->search("(objectClass=gotoMenuEntry)",array("dn"));
       while($attrs = $ldap->fetch()){
-        $info = preg_replace("/".normalizePreg($release.$group)."$/","",$attrs['dn']); 
+        $info = preg_replace("/".preg_quote($release.$group)."$/","",$attrs['dn']); 
         if(preg_match("/^cn=".$this->cn."/",$info) && !preg_match("/ou=[^,]+,/",$info)){
           $found[] = $attrs['dn'];
         }
@@ -413,7 +413,7 @@ class application extends plugin
 
     /* Permissions for that base? */
     if ($this->base != ""){
-      $new_dn= "cn=".$this->cn.",".get_ou('applicationou').$this->base;
+      $new_dn= "cn=".$this->cn.",".get_ou('applicationRDN').$this->base;
     } else {
       $new_dn= $this->dn;
     }
@@ -445,7 +445,7 @@ class application extends plugin
     if($this->is_release()){
       $base = $this->parent->parent->app_release;
     }else{
-      $base = get_ou('applicationou').$this->base;
+      $base = get_ou('applicationRDN').$this->base;
     }
 
     $ldap->ls("(&(objectClass=gosaApplication)(cn=".$this->cn."))",$base,array("cn"));