1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-29 17:00:59 +01:00

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
This commit is contained in:
Chad Little 2015-08-10 09:08:33 -07:00
parent 97e30c1d06
commit 0e7efceb51
2 changed files with 9 additions and 19 deletions

View file

@ -6,17 +6,13 @@ final class PhabricatorApplicationUninstallController
private $application; private $application;
private $action; private $action;
public function willProcessRequest(array $data) { public function handleRequest(AphrontRequest $request) {
$this->application = $data['application']; $viewer = $request->getViewer();
$this->action = $data['action']; $this->action = $request->getURIData('action');
} $this->application = $request->getURIData('application');
public function processRequest() {
$request = $this->getRequest();
$user = $request->getUser();
$selected = id(new PhabricatorApplicationQuery()) $selected = id(new PhabricatorApplicationQuery())
->setViewer($user) ->setViewer($viewer)
->withClasses(array($this->application)) ->withClasses(array($this->application))
->requireCapabilities( ->requireCapabilities(
array( array(
@ -35,7 +31,7 @@ final class PhabricatorApplicationUninstallController
'phabricator.show-prototypes'); 'phabricator.show-prototypes');
$dialog = id(new AphrontDialogView()) $dialog = id(new AphrontDialogView())
->setUser($user) ->setUser($viewer)
->addCancelButton($view_uri); ->addCancelButton($view_uri);
if ($selected->isPrototype() && !$prototypes_enabled) { if ($selected->isPrototype() && !$prototypes_enabled) {
@ -118,7 +114,7 @@ final class PhabricatorApplicationUninstallController
} }
PhabricatorConfigEditor::storeNewValue( PhabricatorConfigEditor::storeNewValue(
$this->getRequest()->getUser(), $this->getViewer(),
$config_entry, $config_entry,
$list, $list,
PhabricatorContentSource::newFromRequest($this->getRequest())); PhabricatorContentSource::newFromRequest($this->getRequest()));

View file

@ -3,19 +3,13 @@
final class PhabricatorApplicationsListController final class PhabricatorApplicationsListController
extends PhabricatorApplicationsController { extends PhabricatorApplicationsController {
private $queryKey;
public function shouldAllowPublic() { public function shouldAllowPublic() {
return true; return true;
} }
public function willProcessRequest(array $data) { public function handleRequest(AphrontRequest $request) {
$this->queryKey = idx($data, 'queryKey');
}
public function processRequest() {
$controller = id(new PhabricatorApplicationSearchController()) $controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->queryKey) ->setQueryKey($request->getURIData('queryKey'))
->setSearchEngine(new PhabricatorAppSearchEngine()) ->setSearchEngine(new PhabricatorAppSearchEngine())
->setNavigation($this->buildSideNavView()); ->setNavigation($this->buildSideNavView());