Fixed some weird behaviour with installation of plugins

This commit is contained in:
slawkens 2020-02-25 10:12:07 +01:00
parent 83a51eebfb
commit 25ab4e187c
2 changed files with 11 additions and 6 deletions

View File

@ -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:

View File

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