1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-20 13:52:40 +01:00

T6870, Return to previous page after login via header

Summary: Fixes T6870, logging in from a public object should land on that object.

Test Plan: Navigate to a maniphest task in a logged out state, login, landing page should be maniphest task.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T6870

Differential Revision: https://secure.phabricator.com/D11289
This commit is contained in:
lkassianik 2015-01-08 15:56:22 -08:00 committed by epriestley
parent f0ade1be1c
commit 6c7e0e2807

View file

@ -60,12 +60,17 @@ final class PhabricatorAuthApplication extends PhabricatorApplication {
// Don't show the "Login" item on auth controllers, since they're
// generally all related to logging in anyway.
} else {
$uri = new PhutilURI('/auth/start/');
if ($controller) {
$path = $controller->getRequest()->getPath();
$uri->setQueryParam('next', $path);
}
$item = id(new PHUIListItemView())
->addClass('core-menu-item')
->setName(pht('Log In'))
// TODO: Login icon?
->setIcon('fa-sign-in')
->setHref('/auth/start/')
->setHref($uri)
->setAural(pht('Log In'))
->setOrder(900);
$items[] = $item;