diff --git a/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc b/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc
index 79e6b57fd1ed008c6d8c2ee94f93cadcfdabc5de..f8364a09999fc3dd0ae42a310269a1fce468605c 100644 (file)
$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;
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
$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'];
}
/* 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;
}
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"));