Code

Updated plugin class
[gosa.git] / gosa-core / include / class_plugin.inc
index a09efa033416924911aef656e5204e7da69386d0..e33b2ec613feebaad84cdcd40bb6e3b1060ac42f 100644 (file)
@@ -212,7 +212,7 @@ class plugin
           unset($this->saved_attributes[$index]);
           continue;
         }
-        if ($this->saved_attributes[$index]["count"] == 1){
+        if (isset($this->saved_attributes[$index][0]) || $this->saved_attributes[$index]["count"] == 1){
           $tmp= $this->saved_attributes[$index][0];
           unset($this->saved_attributes[$index]);
           $this->saved_attributes[$index]= $tmp;
@@ -817,7 +817,7 @@ class plugin
   {
     /* Rename dn in possible object groups */
     $ldap= $this->config->get_ldap_link();
-    $ldap->search('(&(objectClass=gosaGroupOfNames)(member='.vLDAP::prepare4filter($src_dn).'))',
+    $ldap->search('(&(objectClass=gosaGroupOfNames)(member='.@LDAP::prepare4filter($src_dn).'))',
         array('cn'));
     while ($attrs= $ldap->fetch()){
       $og= new ogroup($this->config, $ldap->getDN());
@@ -855,6 +855,11 @@ class plugin
 
   function move($src_dn, $dst_dn)
   {
+    /* Do not copy if only upper- lowercase has changed */
+    if(strtolower($src_dn) == strtolower($dst_dn)){
+      return(TRUE);
+    }
+
     /* Copy source to destination */
     if (!$this->copy($src_dn, $dst_dn)){
       return (FALSE);