1
1
Fork 0

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(); $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();

View file

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