1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-18 19:40:55 +01:00

Removed willProcessRequest from DifferentialRevisionLandController

Summary: Ref T8628.

Test Plan: Landed a revision through the web UI

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley, yelirekim

Maniphest Tasks: T8628

Differential Revision: https://secure.phabricator.com/D16572
This commit is contained in:
Josh Cox 2016-09-15 21:21:58 -04:00
parent 799ecdc278
commit adf9d5ffdd

View file

@ -2,19 +2,12 @@
final class DifferentialRevisionLandController extends DifferentialController {
private $revisionID;
private $strategyClass;
private $pushStrategy;
public function willProcessRequest(array $data) {
$this->revisionID = $data['id'];
$this->strategyClass = $data['strategy'];
}
public function handleRequest(AphrontRequest $request) {
$viewer = $this->getViewer();
$revision_id = $this->revisionID;
$revision_id = $request->getURIData('id');
$strategy_class = $request->getURIData('strategy');
$revision = id(new DifferentialRevisionQuery())
->withIDs(array($revision_id))
@ -24,15 +17,15 @@ final class DifferentialRevisionLandController extends DifferentialController {
return new Aphront404Response();
}
if (is_subclass_of($this->strategyClass, 'DifferentialLandingStrategy')) {
$this->pushStrategy = newv($this->strategyClass, array());
if (is_subclass_of($strategy_class, 'DifferentialLandingStrategy')) {
$this->pushStrategy = newv($strategy_class, array());
} else {
throw new Exception(
pht(
"Strategy type must be a valid class name and must subclass ".
"%s. '%s' is not a subclass of %s",
'DifferentialLandingStrategy',
$this->strategyClass,
$strategy_class,
'DifferentialLandingStrategy'));
}