mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-10-29 17:26:40 +01:00
Actually remove a package
This commit is contained in:
@@ -322,7 +322,6 @@ class AdminController
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle removing a package
|
* Handle removing a package
|
||||||
*
|
*
|
||||||
@@ -342,10 +341,7 @@ class AdminController
|
|||||||
require_once __DIR__ . '/gpm.php';
|
require_once __DIR__ . '/gpm.php';
|
||||||
|
|
||||||
$dependencies = $this->admin->dependenciesThatCanBeRemovedWhenRemoving($package);
|
$dependencies = $this->admin->dependenciesThatCanBeRemovedWhenRemoving($package);
|
||||||
|
$result = \Grav\Plugin\Admin\Gpm::uninstall($package, []);
|
||||||
//TODO: uncomment to actually remove
|
|
||||||
$result = true;
|
|
||||||
// $result = \Grav\Plugin\Admin\Gpm::uninstall($package, []);
|
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$this->admin->json_response = ['status' => 'success', 'dependencies' => $dependencies, 'message' => $this->admin->translate('PLUGIN_ADMIN.UNINSTALL_SUCCESSFUL')];
|
$this->admin->json_response = ['status' => 'success', 'dependencies' => $dependencies, 'message' => $this->admin->translate('PLUGIN_ADMIN.UNINSTALL_SUCCESSFUL')];
|
||||||
|
|||||||
Reference in New Issue
Block a user