From: David ‘Bombe’ Roden Date: Mon, 21 Mar 2011 15:14:52 +0000 (+0100) Subject: Add original URL when redirecting to login page. X-Git-Tag: 0.5.2^2~3^2~3 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=ad29f9185a90c07c95568f81b17b59b314761df8;p=Sone.git Add original URL when redirecting to login page. --- diff --git a/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java b/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java index a7df9c2..5604c82 100644 --- a/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java +++ b/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java @@ -204,7 +204,7 @@ public class SoneTemplatePage extends TemplatePage { @Override protected String getRedirectTarget(Page.Request request) { if (requiresLogin() && (getCurrentSone(request.getToadletContext(), false) == null)) { - return "login.html"; + return "login.html?target=" + request.getHttpRequest().getPath(); } return null; }