mirror of
https://github.com/slawkens/myaac.git
synced 2026-04-25 11:53:31 +02:00
Plugins: Fix uninstall when hook is without HOOK_ prefix
This commit is contained in:
@@ -870,7 +870,11 @@ class Plugins {
|
|||||||
|
|
||||||
global $hooks;
|
global $hooks;
|
||||||
foreach($plugin_info['hooks'] ?? [] as $name => $info) {
|
foreach($plugin_info['hooks'] ?? [] as $name => $info) {
|
||||||
$hooks->unregister($name, $info['type'], $info['file']);
|
if (str_contains($info['type'], 'HOOK_')) {
|
||||||
|
$info['type'] = str_replace('HOOK_', '', $info['type']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$hooks->unregister($name, 'HOOK_' . $info['type'], $info['file']);
|
||||||
}
|
}
|
||||||
|
|
||||||
clearCache();
|
clearCache();
|
||||||
|
|||||||
Reference in New Issue
Block a user