From 4ba9d5e265e4d21b84c02e79c49d27a59a9774ef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come@opensides.be>
Date: Wed, 13 Jul 2016 07:58:05 +0200
Subject: [PATCH] Fixes #4893 Removed last call to check() from copyPaste

---
 include/class_CopyPasteHandler.inc | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/include/class_CopyPasteHandler.inc b/include/class_CopyPasteHandler.inc
index 934ee897b..51be87f49 100644
--- a/include/class_CopyPasteHandler.inc
+++ b/include/class_CopyPasteHandler.inc
@@ -224,7 +224,6 @@ class CopyPasteHandler
           $entry = $this->load_entry_from_ldap($entry, $base);
           $this->queue[$key] = $entry;
         }
-        $msgs = $entry['object']->check();
 
         /* To copy an object we require full read access to the object category */
         $copy_acl = preg_match("/r/", $ui->get_complete_category_acls($entry['dn'], $entry['tab_acl_category']));
@@ -238,10 +237,8 @@ class CopyPasteHandler
           $this->disallowed_objects[$key] = $entry;
         } elseif ($entry['method'] == "cut" && !$cut_acl) {
           $this->disallowed_objects[$key] = $entry;
-        } elseif (!count($msgs)) {
-          $this->clean_objects[$key]  = $entry;
         } else {
-          $this->objects_to_fix[$key] = $entry;
+          $this->clean_objects[$key] = $entry;
         }
       }
       if (count($this->disallowed_objects)) {
@@ -271,6 +268,7 @@ class CopyPasteHandler
         }
         unset($this->clean_objects[$key]);
       }
+      $this->current = FALSE;
     }
 
     /* Save edited entry and force loading new one */
-- 
GitLab