Code

Fixed (,) Problem when moving deps
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 23 Jun 2006 12:06:12 +0000 (12:06 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 23 Jun 2006 12:06:12 +0000 (12:06 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3873 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_plugin.inc

index 23fa324cabd8b83b8e481602d16f12d0a4877965..006631879985df05849eb920db8de34b735f8c13 100644 (file)
@@ -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);