@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator

Update RedirectController for handleRequest

Summary: Ref T8628.

Test Plan: Performed an action that uses the redirect controller (trying to visit a repo page while not logged in). Logged in and was redirected as expected

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, yelirekim

Maniphest Tasks: T8628

Differential Revision: https://secure.phabricator.com/D16571

Josh Cox 799ecdc2 2e4b5b45

+5 -11
+5 -11
src/applications/base/controller/PhabricatorRedirectController.php
··· 2 2 3 3 final class PhabricatorRedirectController extends PhabricatorController { 4 4 5 - private $uri; 6 - private $allowExternal; 7 - 8 5 public function shouldRequireLogin() { 9 6 return false; 10 7 } ··· 13 10 return false; 14 11 } 15 12 16 - public function willProcessRequest(array $data) { 17 - $this->uri = $data['uri']; 18 - $this->allowExternal = idx($data, 'external', false); 19 - } 20 - 21 - public function processRequest() { 13 + public function handleRequest(AphrontRequest $request) { 14 + $uri = $request->getURIData('uri'); 15 + $external = $request->getURIData('external', false); 22 16 return id(new AphrontRedirectResponse()) 23 - ->setURI($this->uri) 24 - ->setIsExternal($this->allowExternal); 17 + ->setURI($uri) 18 + ->setIsExternal($external); 25 19 } 26 20 27 21 }