From 25ab4e187c66e3f0e4cd2469f804183545feea4e Mon Sep 17 00:00:00 2001 From: slawkens Date: Tue, 25 Feb 2020 10:12:07 +0100 Subject: [PATCH] Fixed some weird behaviour with installation of plugins --- CHANGELOG.md | 5 +++++ system/libs/plugins.php | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f35fe4f..6055b295 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## [0.8.1 - x.x.x] + +### Fixed +* Some weird behaviour with installation of plugins + ## [0.8.0 - x.02.2020] ### Added: diff --git a/system/libs/plugins.php b/system/libs/plugins.php index 37180385..04dfaf52 100644 --- a/system/libs/plugins.php +++ b/system/libs/plugins.php @@ -268,6 +268,12 @@ class Plugins { } if($continue) { + if(!$zip->extractTo(BASE)) { // "Real" Install + self::$error = 'There was a problem with extracting zip archive to base directory.'; + $zip->close(); + return false; + } + if (isset($plugin_json['install'])) { if (file_exists(BASE . $plugin_json['install'])) { $db->revalidateCache(); @@ -278,12 +284,6 @@ class Plugins { self::$warnings[] = 'Cannot load install script. Your plugin might be not working correctly.'; } - if(!$zip->extractTo(BASE)) { // "Real" Install - self::$error = 'There was a problem with extracting zip archive to base directory.'; - $zip->close(); - return false; - } - $cache = Cache::getInstance(); if($cache->enabled()) { $cache->delete('templates');