Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/controller/PhabricatorAuthStartController.php
Show First 20 Lines • Show All 219 Lines • ▼ Show 20 Lines | private function processAjaxRequest() { | ||||
// login to use. We give them a dialog saying "You need to login...". | // login to use. We give them a dialog saying "You need to login...". | ||||
if ($request->isDialogFormPost()) { | if ($request->isDialogFormPost()) { | ||||
return id(new AphrontRedirectResponse())->setURI( | return id(new AphrontRedirectResponse())->setURI( | ||||
$request->getRequestURI()); | $request->getRequestURI()); | ||||
} | } | ||||
// Often, users end up here by clicking a disabled action link in the UI | // Often, users end up here by clicking a disabled action link in the UI | ||||
// (for example, they might click "Edit Blocking Tasks" on a Maniphest | // (for example, they might click "Edit Subtasks" on a Maniphest task | ||||
// task page). After they log in we want to send them back to that main | // page). After they log in we want to send them back to that main object | ||||
// object page if we can, since it's confusing to end up on a standalone | // page if we can, since it's confusing to end up on a standalone page with | ||||
// page with only a dialog (particularly if that dialog is another error, | // only a dialog (particularly if that dialog is another error, | ||||
// like a policy exception). | // like a policy exception). | ||||
$via_header = AphrontRequest::getViaHeaderName(); | $via_header = AphrontRequest::getViaHeaderName(); | ||||
$via_uri = AphrontRequest::getHTTPHeader($via_header); | $via_uri = AphrontRequest::getHTTPHeader($via_header); | ||||
if (strlen($via_uri)) { | if (strlen($via_uri)) { | ||||
PhabricatorCookies::setNextURICookie($request, $via_uri, $force = true); | PhabricatorCookies::setNextURICookie($request, $via_uri, $force = true); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines |