Merge pull request #7116 from MrPetovan/task/improve-addon-admin
Improve addon admin
This commit is contained in:
commit
7bd1a34bf8
|
@ -149,6 +149,8 @@ class Addon extends BaseObject
|
||||||
$func();
|
$func();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DBA::delete('hook', ['file' => 'addon/' . $addon . '/' . $addon . '.php']);
|
||||||
|
|
||||||
unset(self::$addons[array_search($addon, self::$addons)]);
|
unset(self::$addons[array_search($addon, self::$addons)]);
|
||||||
|
|
||||||
Addon::saveEnabledList();
|
Addon::saveEnabledList();
|
||||||
|
|
|
@ -48,7 +48,8 @@ class Details extends BaseAdminModule
|
||||||
$addon = $a->argv[2];
|
$addon = $a->argv[2];
|
||||||
$addon = Strings::sanitizeFilePathItem($addon);
|
$addon = Strings::sanitizeFilePathItem($addon);
|
||||||
if (!is_file("addon/$addon/$addon.php")) {
|
if (!is_file("addon/$addon/$addon.php")) {
|
||||||
notice(L10n::t('Item not found.'));
|
notice(L10n::t('Addon not found.'));
|
||||||
|
Addon::uninstall($addon);
|
||||||
$a->internalRedirect('admin/addons');
|
$a->internalRedirect('admin/addons');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue