Merge pull request #7116 from MrPetovan/task/improve-addon-admin

Improve addon admin
This commit is contained in:
Philipp 2019-05-09 16:49:38 +02:00 committed by GitHub
commit 7bd1a34bf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -149,6 +149,8 @@ class Addon extends BaseObject
$func();
}
DBA::delete('hook', ['file' => 'addon/' . $addon . '/' . $addon . '.php']);
unset(self::$addons[array_search($addon, self::$addons)]);
Addon::saveEnabledList();

View File

@ -48,7 +48,8 @@ class Details extends BaseAdminModule
$addon = $a->argv[2];
$addon = Strings::sanitizeFilePathItem($addon);
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');
}