From: hickert Date: Fri, 23 Jun 2006 12:06:12 +0000 (+0000) Subject: Fixed (,) Problem when moving deps X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=be0e52260bb34fc17d5bec3d279893744a64c4a7;p=gosa.git Fixed (,) Problem when moving deps git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3873 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_plugin.inc b/include/class_plugin.inc index 23fa324ca..006631879 100644 --- a/include/class_plugin.inc +++ b/include/class_plugin.inc @@ -729,20 +729,11 @@ class plugin /* Adapt naming attribute */ $dst_name= preg_replace("/^([^=]+)=.*$/", "\\1", $dst_dn); $dst_val = preg_replace("/^[^=]+=([^,+]+).*,.*$/", "\\1", $dst_dn); - $new[$dst_name]= $dst_val; - - /* Check if this is a department. - * If it is a dep. && there is a , override in his ou - * change \2C to , again, else this entry can't be saved ... - */ - if((isset($new['ou'])) &&( preg_match("/\\\\2C/",$new['ou']))){ - $new['ou'] = preg_replace("/\\\\2C/",",",$new['ou']); - } + $new[$dst_name]= str_replace("\\","", ldap::fix($dst_val)); /* Save copy */ $ldap->connect(); $ldap->cd($this->config->current['BASE']); - $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $dst_dn)); /* FAIvariable=.../..., cn=.. @@ -753,7 +744,7 @@ class plugin } $ldap->cd($dst_dn); $ldap->add($new); - + if ($ldap->error != "Success"){ trigger_error("Trying to save $dst_dn failed.", E_USER_WARNING);