From 0e7efceb5123da21084ab24881dc58875e6a6b7b Mon Sep 17 00:00:00 2001 From: Chad Little Date: Mon, 10 Aug 2015 09:08:33 -0700 Subject: [PATCH] Update Meta for handleRequest Summary: Updates Applications application for handleRequest Test Plan: Install, Uninstall an application Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D13839 --- ...abricatorApplicationUninstallController.php | 18 +++++++----------- .../PhabricatorApplicationsListController.php | 10 ++-------- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/src/applications/meta/controller/PhabricatorApplicationUninstallController.php b/src/applications/meta/controller/PhabricatorApplicationUninstallController.php index ae1c5f8748..68518413bf 100644 --- a/src/applications/meta/controller/PhabricatorApplicationUninstallController.php +++ b/src/applications/meta/controller/PhabricatorApplicationUninstallController.php @@ -6,17 +6,13 @@ final class PhabricatorApplicationUninstallController private $application; private $action; - public function willProcessRequest(array $data) { - $this->application = $data['application']; - $this->action = $data['action']; - } - - public function processRequest() { - $request = $this->getRequest(); - $user = $request->getUser(); + public function handleRequest(AphrontRequest $request) { + $viewer = $request->getViewer(); + $this->action = $request->getURIData('action'); + $this->application = $request->getURIData('application'); $selected = id(new PhabricatorApplicationQuery()) - ->setViewer($user) + ->setViewer($viewer) ->withClasses(array($this->application)) ->requireCapabilities( array( @@ -35,7 +31,7 @@ final class PhabricatorApplicationUninstallController 'phabricator.show-prototypes'); $dialog = id(new AphrontDialogView()) - ->setUser($user) + ->setUser($viewer) ->addCancelButton($view_uri); if ($selected->isPrototype() && !$prototypes_enabled) { @@ -118,7 +114,7 @@ final class PhabricatorApplicationUninstallController } PhabricatorConfigEditor::storeNewValue( - $this->getRequest()->getUser(), + $this->getViewer(), $config_entry, $list, PhabricatorContentSource::newFromRequest($this->getRequest())); diff --git a/src/applications/meta/controller/PhabricatorApplicationsListController.php b/src/applications/meta/controller/PhabricatorApplicationsListController.php index f6aa650334..cbbbbcf97f 100644 --- a/src/applications/meta/controller/PhabricatorApplicationsListController.php +++ b/src/applications/meta/controller/PhabricatorApplicationsListController.php @@ -3,19 +3,13 @@ final class PhabricatorApplicationsListController extends PhabricatorApplicationsController { - private $queryKey; - public function shouldAllowPublic() { return true; } - public function willProcessRequest(array $data) { - $this->queryKey = idx($data, 'queryKey'); - } - - public function processRequest() { + public function handleRequest(AphrontRequest $request) { $controller = id(new PhabricatorApplicationSearchController()) - ->setQueryKey($this->queryKey) + ->setQueryKey($request->getURIData('queryKey')) ->setSearchEngine(new PhabricatorAppSearchEngine()) ->setNavigation($this->buildSideNavView());