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');