mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-18 12:52:42 +01:00
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
This commit is contained in:
parent
2e4b5b45a2
commit
799ecdc278
1 changed files with 5 additions and 11 deletions
|
@ -2,9 +2,6 @@
|
|||
|
||||
final class PhabricatorRedirectController extends PhabricatorController {
|
||||
|
||||
private $uri;
|
||||
private $allowExternal;
|
||||
|
||||
public function shouldRequireLogin() {
|
||||
return false;
|
||||
}
|
||||
|
@ -13,15 +10,12 @@ final class PhabricatorRedirectController extends PhabricatorController {
|
|||
return false;
|
||||
}
|
||||
|
||||
public function willProcessRequest(array $data) {
|
||||
$this->uri = $data['uri'];
|
||||
$this->allowExternal = idx($data, 'external', false);
|
||||
}
|
||||
|
||||
public function processRequest() {
|
||||
public function handleRequest(AphrontRequest $request) {
|
||||
$uri = $request->getURIData('uri');
|
||||
$external = $request->getURIData('external', false);
|
||||
return id(new AphrontRedirectResponse())
|
||||
->setURI($this->uri)
|
||||
->setIsExternal($this->allowExternal);
|
||||
->setURI($uri)
|
||||
->setIsExternal($external);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue