Increase the possible length of “returnPage” because 64 is too short.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / UnlikePage.java
index bedf759..1ecacc8 100644 (file)
@@ -38,7 +38,7 @@ public class UnlikePage extends SoneTemplatePage {
         *            The Sone web interface
         */
        public UnlikePage(Template template, WebInterface webInterface) {
-               super("unlike.html", template, "Page.UnlikePost.Title", webInterface);
+               super("unlike.html", template, "Page.Unlike.Title", webInterface, true);
        }
 
        //
@@ -54,7 +54,7 @@ public class UnlikePage extends SoneTemplatePage {
                if (request.getMethod() == Method.POST) {
                        String type = request.getHttpRequest().getPartAsStringFailsafe("type", 16);
                        String id = request.getHttpRequest().getPartAsStringFailsafe(type, 36);
-                       String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 64);
+                       String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 256);
                        Sone currentSone = getCurrentSone(request.getToadletContext());
                        if ("post".equals(type)) {
                                currentSone.removeLikedPostId(id);
@@ -65,16 +65,4 @@ public class UnlikePage extends SoneTemplatePage {
                }
        }
 
-       //
-       // SONETEMPLATEPAGE METHODS
-       //
-
-       /**
-        * {@inheritDoc}
-        */
-       @Override
-       protected boolean requiresLogin() {
-               return true;
-       }
-
 }