diff --git a/src/applications/people/controller/PhabricatorPeopleApproveController.php b/src/applications/people/controller/PhabricatorPeopleApproveController.php --- a/src/applications/people/controller/PhabricatorPeopleApproveController.php +++ b/src/applications/people/controller/PhabricatorPeopleApproveController.php @@ -3,20 +3,12 @@ final class PhabricatorPeopleApproveController extends PhabricatorPeopleController { - private $id; - - public function willProcessRequest(array $data) { - $this->id = idx($data, 'id'); - } - - public function processRequest() { - - $request = $this->getRequest(); - $admin = $request->getUser(); + public function handleRequest(AphrontRequest $request) { + $viewer = $request->getViewer(); $user = id(new PhabricatorPeopleQuery()) - ->setViewer($admin) - ->withIDs(array($this->id)) + ->setViewer($viewer) + ->withIDs(array($request->getURIData('id'))) ->executeOne(); if (!$user) { return new Aphront404Response(); @@ -26,7 +18,7 @@ if ($request->isFormPost()) { id(new PhabricatorUserEditor()) - ->setActor($admin) + ->setActor($viewer) ->approveUser($user, true); $title = pht( @@ -39,12 +31,12 @@ 'Your Phabricator account (%s) has been approved by %s. You can '. 'login here:', $user->getUsername(), - $admin->getUsername()), + $viewer->getUsername()), PhabricatorEnv::getProductionURI('/')); $mail = id(new PhabricatorMetaMTAMail()) ->addTos(array($user->getPHID())) - ->addCCs(array($admin->getPHID())) + ->addCCs(array($viewer->getPHID())) ->setSubject('[Phabricator] '.$title) ->setForceDelivery(true) ->setBody($body) diff --git a/src/applications/people/controller/PhabricatorPeopleListController.php b/src/applications/people/controller/PhabricatorPeopleListController.php --- a/src/applications/people/controller/PhabricatorPeopleListController.php +++ b/src/applications/people/controller/PhabricatorPeopleListController.php @@ -3,8 +3,6 @@ final class PhabricatorPeopleListController extends PhabricatorPeopleController { - private $key; - public function shouldAllowPublic() { return true; } @@ -13,16 +11,12 @@ return false; } - public function willProcessRequest(array $data) { - $this->key = idx($data, 'key'); - } - - public function processRequest() { + public function handleRequest(AphrontRequest $request) { $this->requireApplicationCapability( PeopleBrowseUserDirectoryCapability::CAPABILITY); $controller = id(new PhabricatorApplicationSearchController()) - ->setQueryKey($this->key) + ->setQueryKey($request->getURIData('key')) ->setSearchEngine(new PhabricatorPeopleSearchEngine()) ->setNavigation($this->buildSideNavView()); diff --git a/src/applications/people/controller/PhabricatorPeopleLogsController.php b/src/applications/people/controller/PhabricatorPeopleLogsController.php --- a/src/applications/people/controller/PhabricatorPeopleLogsController.php +++ b/src/applications/people/controller/PhabricatorPeopleLogsController.php @@ -3,15 +3,9 @@ final class PhabricatorPeopleLogsController extends PhabricatorPeopleController { - private $queryKey; - - public function willProcessRequest(array $data) { - $this->queryKey = idx($data, 'queryKey'); - } - - public function processRequest() { - $controller = id(new PhabricatorApplicationSearchController()) - ->setQueryKey($this->queryKey) + public function handleRequest(AphrontRequest $request) { + $controller = id(new PhabricatorApplicationSearchController()) + ->setQueryKey($request->getURIData('queryKey')) ->setSearchEngine(new PhabricatorPeopleLogSearchEngine()) ->setNavigation($this->buildSideNavView());