Update Project for handleRequest

Summary: Updates Projects to use handleRequest

Test Plan: New Project, Edit Project, Archive, Watch, Create Workboards, Import Workboards, Edit Column, New Column, Change Icon, Add/Remove Members

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D13829
This commit is contained in:
Chad Little
2015-08-08 10:34:55 -07:00
parent d2ef273ecd
commit 44f18cfb12
16 changed files with 90 additions and 185 deletions

View File

@@ -3,21 +3,14 @@
final class PhabricatorProjectWatchController
extends PhabricatorProjectController {
private $id;
private $action;
public function willProcessRequest(array $data) {
$this->id = $data['id'];
$this->action = $data['action'];
}
public function processRequest() {
$request = $this->getRequest();
$viewer = $request->getUser();
public function handleRequest(AphrontRequest $request) {
$viewer = $request->getViewer();
$id = $request->getURIData('id');
$action = $request->getURIData('action');
$project = id(new PhabricatorProjectQuery())
->setViewer($viewer)
->withIDs(array($this->id))
->withIDs(array($id))
->needMembers(true)
->needWatchers(true)
->executeOne();
@@ -34,7 +27,7 @@ final class PhabricatorProjectWatchController
if ($request->isDialogFormPost()) {
$edge_action = null;
switch ($this->action) {
switch ($action) {
case 'watch':
$edge_action = '+';
$force_subscribe = true;
@@ -67,7 +60,7 @@ final class PhabricatorProjectWatchController
}
$dialog = null;
switch ($this->action) {
switch ($action) {
case 'watch':
$title = pht('Watch Project?');
$body = pht(