From adf9d5ffdd61671e4211e4adc96b5e0ba005d1f7 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Thu, 15 Sep 2016 21:21:58 -0400 Subject: [PATCH] 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 --- .../DifferentialRevisionLandController.php | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/applications/differential/controller/DifferentialRevisionLandController.php b/src/applications/differential/controller/DifferentialRevisionLandController.php index f2d2497a42..0e222370df 100644 --- a/src/applications/differential/controller/DifferentialRevisionLandController.php +++ b/src/applications/differential/controller/DifferentialRevisionLandController.php @@ -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')); }