Code

- Corrected attr in place of attrs
[gosa.git] / include / class_CopyPasteHandler.inc
index e09e6926bd4d212f112086cd148be70b8a708981..f50cef728cfed67a05c0c7fc85694e6cdb7086d8 100644 (file)
@@ -67,20 +67,6 @@ class CopyPasteHandler {
         }
       }
     }
-
-    /* Ensure that UnitTags will be kept when pasted */
-    if(isset($obj->gosaUnitTag) && !empty($obj->gosaUnitTag)){
-      foreach($this->current->by_object as $name => $obj){
-        if(!in_array("gosaAdministrativeUnitTag",$this->current->by_object[$name]->objectclasses)){
-          $this->current->by_object[$name]->objectclasses[] = "gosaAdministrativeUnitTag";
-          $this->current->by_object[$name]->gosaUnitTag = $obj->gosaUnitTag;
-          if(!in_array("gosaUnitTag",$this->current->by_object[$name]->attributes)){
-            $this->current->by_object[$name]->attributes[] =  "gosaUnitTag";
-          }
-        }
-      }
-    }
-
     if($this->isCurrentObjectPastAble()){
       return(true);
     }else{
@@ -216,9 +202,9 @@ class CopyPasteHandler {
   function check()
   {
     $ret = array();
-    foreach($this->    current->by_object as $obj){
+    foreach($this->    current->by_object as $key => $obj){
       if($obj->is_account){
-        $ret = array_merge($ret , $obj->check());
+        $ret = array_merge($ret , $this->current->by_object[$key]->check());
       }
     }
     return($ret);