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:
parent
799ecdc278
commit
adf9d5ffdd
1 changed files with 5 additions and 12 deletions
|
@ -2,19 +2,12 @@
|
||||||
|
|
||||||
final class DifferentialRevisionLandController extends DifferentialController {
|
final class DifferentialRevisionLandController extends DifferentialController {
|
||||||
|
|
||||||
private $revisionID;
|
|
||||||
private $strategyClass;
|
|
||||||
private $pushStrategy;
|
private $pushStrategy;
|
||||||
|
|
||||||
public function willProcessRequest(array $data) {
|
|
||||||
$this->revisionID = $data['id'];
|
|
||||||
$this->strategyClass = $data['strategy'];
|
|
||||||
}
|
|
||||||
|
|
||||||
public function handleRequest(AphrontRequest $request) {
|
public function handleRequest(AphrontRequest $request) {
|
||||||
$viewer = $this->getViewer();
|
$viewer = $this->getViewer();
|
||||||
|
$revision_id = $request->getURIData('id');
|
||||||
$revision_id = $this->revisionID;
|
$strategy_class = $request->getURIData('strategy');
|
||||||
|
|
||||||
$revision = id(new DifferentialRevisionQuery())
|
$revision = id(new DifferentialRevisionQuery())
|
||||||
->withIDs(array($revision_id))
|
->withIDs(array($revision_id))
|
||||||
|
@ -24,15 +17,15 @@ final class DifferentialRevisionLandController extends DifferentialController {
|
||||||
return new Aphront404Response();
|
return new Aphront404Response();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_subclass_of($this->strategyClass, 'DifferentialLandingStrategy')) {
|
if (is_subclass_of($strategy_class, 'DifferentialLandingStrategy')) {
|
||||||
$this->pushStrategy = newv($this->strategyClass, array());
|
$this->pushStrategy = newv($strategy_class, array());
|
||||||
} else {
|
} else {
|
||||||
throw new Exception(
|
throw new Exception(
|
||||||
pht(
|
pht(
|
||||||
"Strategy type must be a valid class name and must subclass ".
|
"Strategy type must be a valid class name and must subclass ".
|
||||||
"%s. '%s' is not a subclass of %s",
|
"%s. '%s' is not a subclass of %s",
|
||||||
'DifferentialLandingStrategy',
|
'DifferentialLandingStrategy',
|
||||||
$this->strategyClass,
|
$strategy_class,
|
||||||
'DifferentialLandingStrategy'));
|
'DifferentialLandingStrategy'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue