From f71a4ea27ef8a7ef12466a81d62b5ca60fc69854 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 22 Sep 2011 07:53:54 +0200 Subject: [PATCH] Add return page to form parameters. --- src/main/java/net/pterodactylus/sone/web/EditImagePage.java | 3 ++- src/main/resources/templates/imageBrowser.html | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/pterodactylus/sone/web/EditImagePage.java b/src/main/java/net/pterodactylus/sone/web/EditImagePage.java index afb8787..8bb5a44 100644 --- a/src/main/java/net/pterodactylus/sone/web/EditImagePage.java +++ b/src/main/java/net/pterodactylus/sone/web/EditImagePage.java @@ -54,6 +54,7 @@ public class EditImagePage extends SoneTemplatePage { super.processTemplate(request, templateContext); if (request.getMethod() == Method.POST) { String imageId = request.getHttpRequest().getPartAsStringFailsafe("image", 36); + String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 256); Image image = webInterface.getCore().getImage(imageId, false); if (image == null) { throw new RedirectException("invalid.html"); @@ -69,7 +70,7 @@ public class EditImagePage extends SoneTemplatePage { image.setTitle(title); image.setDescription(description); webInterface.getCore().touchConfiguration(); - throw new RedirectException("imageBrowser.html?image=" + image.getId()); + throw new RedirectException(returnPage); } } diff --git a/src/main/resources/templates/imageBrowser.html b/src/main/resources/templates/imageBrowser.html index 6adb3dd..5a26c1a 100644 --- a/src/main/resources/templates/imageBrowser.html +++ b/src/main/resources/templates/imageBrowser.html @@ -229,6 +229,7 @@
+
-- 2.7.4