From fbb470c7eee87cc5a5afb8cb6a83d476094df445 Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Thu, 22 Oct 2020 16:14:14 -0600 Subject: [PATCH] UX improvements for managing plugins. Fixes #5127, also will force a page reload after changing the status of a plugin (remove, disable, enable, etc) so that the menu structure is accurately reflected. --- modules/system/controllers/Updates.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/system/controllers/Updates.php b/modules/system/controllers/Updates.php index 1d1be7923..230cd57c2 100644 --- a/modules/system/controllers/Updates.php +++ b/modules/system/controllers/Updates.php @@ -450,12 +450,15 @@ class Updates extends Controller /** * Contacts the update server for a list of necessary updates. + * + * @param bool $force Whether or not to force the redownload of existing tools + * @return string The rendered "execute" partial */ - public function onForceUpdate() + public function onForceUpdate($force = true) { try { $manager = UpdateManager::instance(); - $result = $manager->requestUpdateList(true); + $result = $manager->requestUpdateList($force); $coreHash = array_get($result, 'core.hash', false); $coreBuild = array_get($result, 'core.build', false); @@ -706,7 +709,7 @@ class Updates extends Controller 'system::project.owner' => $result['owner'], ]); - return $this->onForceUpdate(); + return $this->onForceUpdate(false); } catch (Exception $ex) { $this->handleError($ex); @@ -878,7 +881,7 @@ class Updates extends Controller } Flash::success(Lang::get("system::lang.plugins.{$bulkAction}_success")); - return $this->listRefresh('manage'); + return redirect()->refresh(); } //