mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-20 04:20:55 +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:
parent
97e30c1d06
commit
0e7efceb51
2 changed files with 9 additions and 19 deletions
|
@ -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()));
|
||||
|
|
|
@ -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());
|
||||
|
||||
|
|
Loading…
Reference in a new issue