Code

Compare LDAP::fix()'ed DNs only, because othereise the the comparison
authorpsc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 22 Jun 2009 14:05:51 +0000 (14:05 +0000)
committerpsc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 22 Jun 2009 14:05:51 +0000 (14:05 +0000)
can fail if DNs contain special characters.
(#1917)

git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@13761 594d385d-05f5-0310-b6e9-bd551577e9d8

trunk/gosa-core/plugins/admin/ogroups/class_ogroup.inc
trunk/gosa-core/plugins/admin/ogroups/tabs_ogroups.inc

index 45faac81fe78d25482a7d6ed49eb992db4cd95b5..991937afa05d319245796a9047aa368ded4ff50d 100644 (file)
@@ -914,7 +914,7 @@ class ogroup extends plugin
     }
 
     $ldap = $this->config->get_ldap_link();
-    if($this->dn != $new_dn){
+    if(LDAP::fix($this->dn) != LDAP::fix($new_dn)){
       $ldap->cat ($new_dn, array('dn'));
     }
     
index 0ea570e81608d78216e78fe2241602e5355877a6..8bf9f7eaecec9d2666ad8b5acbd86cb57067fdd9 100644 (file)
@@ -339,7 +339,7 @@ class ogrouptabs extends tabs
     $new_dn= 'cn='.$baseobject->cn.','.get_ou('ogroupRDN').$baseobject->base;
 
     /* Move group? */
-    if ($this->dn != $new_dn){
+    if (LDAP::fix($this->dn) != LDAP::fix($new_dn)){
 
       /* Write entry on new 'dn' */
       if ($this->dn != "new"){