From 8b643edd502353f018c88857186fc5e3ab22ccc9 Mon Sep 17 00:00:00 2001
From: Henning Leutz <leutz@pcsg.de>
Date: Thu, 17 Aug 2017 10:50:27 +0200
Subject: [PATCH] =?UTF-8?q?fix:=20kopieren=20von=20installierten=20ckedito?=
 =?UTF-8?q?r=20plugins=20wird=20nun=20richtig=20beim=20setup=20durchgef?=
 =?UTF-8?q?=C3=BChrt?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/QUI/Ckeditor/EventHandler.php    |  1 -
 src/QUI/Ckeditor/Plugins/Manager.php | 12 +++++-------
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/QUI/Ckeditor/EventHandler.php b/src/QUI/Ckeditor/EventHandler.php
index b1596c2..b87c62a 100644
--- a/src/QUI/Ckeditor/EventHandler.php
+++ b/src/QUI/Ckeditor/EventHandler.php
@@ -16,7 +16,6 @@ use QUI\Package\Package;
  */
 class EventHandler
 {
-
     /**
      * @param Package $Package
      */
diff --git a/src/QUI/Ckeditor/Plugins/Manager.php b/src/QUI/Ckeditor/Plugins/Manager.php
index f694554..a19f4f4 100644
--- a/src/QUI/Ckeditor/Plugins/Manager.php
+++ b/src/QUI/Ckeditor/Plugins/Manager.php
@@ -154,7 +154,7 @@ class Manager
                 }
 
                 $pluginName = $entry;
-                // Special case, because gitlab gets confused with the dirctory named "codeTag"
+                // Special case, because gitlab gets confused with the directory named "codeTag"
                 if ($entry == "code") {
                     $pluginName = "codeTag";
                 }
@@ -165,16 +165,11 @@ class Manager
                     $targetDir = $this->activePluginDir;
                 }
 
-
                 if (!is_dir($srcDir."/".$entry)) {
                     continue;
                 }
 
-                if (is_dir($this->installedPluginDir."/".$pluginName)) {
-                    continue;
-                }
-
-                if (is_dir($this->activePluginDir."/".$pluginName)) {
+                if (!is_dir($this->activePluginDir."/".$pluginName)) {
                     continue;
                 }
 
@@ -182,6 +177,9 @@ class Manager
                     continue;
                 }
 
+                // vorher löschen, da sonst nicht kopiert werden kann
+                QUI::getTemp()->moveToTemp($targetDir."/".$pluginName);
+
                 $this->copyDir(
                     $srcDir."/".$entry,
                     $targetDir."/".$pluginName
-- 
GitLab