mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 14:00:56 +01:00
Use correct viewer for debug.stop-on-redirect
Summary: See <https://github.com/facebook/phabricator/pull/563>. I think this secondary construction of a `$user` is very old, and predates subsequent changes which cause a proper user to construct earlier, so using the user on the `$request` should (I think) always work. I couldn't immediately find any cases where it does not. Test Plan: With `debug.stop-on-redirect` set, hit various redirects, like jump-naving to T1. Got a proper stop dialog. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D8718
This commit is contained in:
parent
b937bf5946
commit
58ba8e7d63
1 changed files with 7 additions and 6 deletions
|
@ -41,16 +41,17 @@ class AphrontRedirectResponse extends AphrontResponse {
|
|||
|
||||
public function buildResponseString() {
|
||||
if ($this->shouldStopForDebugging()) {
|
||||
$user = new PhabricatorUser();
|
||||
$request = $this->getRequest();
|
||||
$viewer = $request->getUser();
|
||||
|
||||
$view = new PhabricatorStandardPageView();
|
||||
$view->setRequest($this->getRequest());
|
||||
$view->setApplicationName('Debug');
|
||||
$view->setTitle('Stopped on Redirect');
|
||||
$view->setApplicationName(pht('Debug'));
|
||||
$view->setTitle(pht('Stopped on Redirect'));
|
||||
|
||||
$dialog = new AphrontDialogView();
|
||||
$dialog->setUser($user);
|
||||
$dialog->setTitle('Stopped on Redirect');
|
||||
$dialog->setUser($viewer);
|
||||
$dialog->setTitle(pht('Stopped on Redirect'));
|
||||
|
||||
$dialog->appendParagraph(
|
||||
pht(
|
||||
|
@ -68,7 +69,7 @@ class AphrontRedirectResponse extends AphrontResponse {
|
|||
|
||||
$dialog->appendChild(
|
||||
id(new AphrontStackTraceView())
|
||||
->setUser($user)
|
||||
->setUser($viewer)
|
||||
->setTrace($this->stackWhenCreated));
|
||||
|
||||
$dialog->setIsStandalone(true);
|
||||
|
|
Loading…
Reference in a new issue