Code

Updated object handling, special chars in obejct dns
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 29 Jul 2010 13:54:46 +0000 (13:54 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 29 Jul 2010 13:54:46 +0000 (13:54 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19265 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/mimetypes/tabs_mimetypes.inc

index 6244c0623acf1eff7ae4ac103cea62d007f70b9a..7dcb5c54cef7a40629d74bcc98d563d460319a89 100644 (file)
@@ -24,15 +24,20 @@ class mimetabs extends tabs
   function save($ignore_account= FALSE)
   {
     $baseobject= $this->by_object['mimetype'];
+    $cn      = preg_replace('/,/', '\,', $baseobject->cn);
+    $cn      = preg_replace('/"/', '\"', $cn);
 
     /* Check for new 'dn', in order to propagate the
        'dn' to all plugins */
+
     if($this->parent->IsReleaseManagementActivated()){
-      $new_dn= "cn=".$baseobject->cn.",".$this->parent->mime_release;
+      $new_dn= "cn=".$cn.",".$this->parent->mime_release;
     }else{
-      $new_dn= "cn=".$baseobject->cn.",".get_ou("mimetype", "mimetypeRDN").$baseobject->base;
+      $new_dn= "cn=".$cn.",".get_ou("mimetype", "mimetypeRDN").$baseobject->base;
     }
 
+    $new_dn =  @LDAP::convert($new_dn);
+
     /* Move group? */
     if ($this->dn != $new_dn){