mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-29 10:49:22 +02:00
Refactor code + use clearCache() instead
This commit is contained in:
parent
1d0c173e7d
commit
d0d0af289d
@ -793,25 +793,19 @@ class Plugins {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($success) {
|
if(!$success) {
|
||||||
foreach($plugin_info['uninstall'] as $file) {
|
$revertEnable();
|
||||||
if(!deleteDirectory(BASE . $file)) {
|
return false;
|
||||||
self::$warnings[] = 'Cannot delete: ' . $file;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$cache = Cache::getInstance();
|
|
||||||
if($cache->enabled()) {
|
|
||||||
$cache->delete('templates');
|
|
||||||
$cache->delete('hooks');
|
|
||||||
$cache->delete('template_menus');
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$revertEnable();
|
foreach($plugin_info['uninstall'] as $file) {
|
||||||
return false;
|
if(!deleteDirectory(BASE . $file)) {
|
||||||
|
self::$warnings[] = 'Cannot delete: ' . $file;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
clearCache();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function is_installed($plugin_name, $version): bool
|
public static function is_installed($plugin_name, $version): bool
|
||||||
|
Loading…
x
Reference in New Issue
Block a user