diff --git a/src/QUI/Ckeditor/EventHandler.php b/src/QUI/Ckeditor/EventHandler.php index b87c62afc95215e7c41c28c45d0ae2f8c5cb0d93..d2db7f2b42b35ae1ffde6343567ccff70a4d666e 100644 --- a/src/QUI/Ckeditor/EventHandler.php +++ b/src/QUI/Ckeditor/EventHandler.php @@ -8,6 +8,7 @@ namespace QUI\Ckeditor; use QUI\Ckeditor\Plugins\Manager; use QUI\Package\Package; +use QUI\Utils\System\File; /** * Class EventHandler @@ -26,6 +27,30 @@ class EventHandler } $PluginManager = new Manager(); + + // ----- Begin tempfix ----- + // This is a temporary fix for updating the systems + // there was a bug in the utils package which compromised the update process of the ckeditor, thus rendering the ckeditor useless + echo "Checking: " . VAR_DIR . "package/quiqqer/ckeditor4/plugins/bin/image/dialogs/image.js" . PHP_EOL; + if (!file_exists(VAR_DIR . "package/quiqqer/ckeditor4/plugins/bin/image/dialogs/image.js")) { + echo "Does not exist!" . PHP_EOL; + +// File::deleteDir(VAR_DIR . "package/quiqqer/ckeditor4/plugins"); + $newFolder = VAR_DIR . "package/quiqqer/ckeditor4/plugins." . time() . ".bak"; + rename( + VAR_DIR . "package/quiqqer/ckeditor4/plugins", + $newFolder + ); + + file_put_contents( + $newFolder . "/README.md", + "This directory was created as backup. If your ckeditor is working as intended you can delete this directory if you do not need it anymore" + ); + } + + // ----- End tempfix ----- + + $PluginManager->installPluginsFromSource(); } diff --git a/src/QUI/Ckeditor/Plugins/Manager.php b/src/QUI/Ckeditor/Plugins/Manager.php index e6377e9d2602e4bd2c33201fbc752d46862b1d4a..607d6b04c31a9de4392a77cafc4f8024846c5d67 100644 --- a/src/QUI/Ckeditor/Plugins/Manager.php +++ b/src/QUI/Ckeditor/Plugins/Manager.php @@ -591,7 +591,7 @@ class Manager public function copyDir($src, $target) { if (!is_dir($target)) { - mkdir($target, 0755); + mkdir($target, 0755, true); } $entries = scandir($src);