X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FCreateSonePage.java;h=f97755607450440f80161f94a574b971c071cca6;hb=e6c5500dd519bf58064b72ed5491920ddbf00fcd;hp=901874ca50eb3841c22313bcdc7548fad429c0de;hpb=f17746700b861bb3485b839397a6fc073ab0bd93;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java b/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java index 901874c..f977556 100644 --- a/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java +++ b/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java @@ -47,7 +47,7 @@ public class CreateSonePage extends SoneTemplatePage { * The Sone web interface */ public CreateSonePage(Template template, WebInterface webInterface) { - super("createSone.html", template, "Page.CreateSone.Title", webInterface); + super("createSone.html", template, "Page.CreateSone.Title", webInterface, false); } // @@ -61,22 +61,17 @@ public class CreateSonePage extends SoneTemplatePage { protected void processTemplate(Request request, Template template) throws RedirectException { super.processTemplate(request, template); String name = ""; - String documentName = null; String requestUri = null; String insertUri = null; if (request.getMethod() == Method.POST) { name = request.getHttpRequest().getPartAsStringFailsafe("name", 100); - documentName = request.getHttpRequest().getPartAsStringFailsafe("document-name", 96); - if (documentName.trim().length() == 0) { - documentName = "Sone-" + name; - } if (request.getHttpRequest().getParam("create-from-uri").length() > 0) { requestUri = request.getHttpRequest().getPartAsStringFailsafe("request-uri", 256); insertUri = request.getHttpRequest().getPartAsStringFailsafe("insert-uri", 256); } try { /* create Sone. */ - Sone sone = webInterface.core().createSone(name, documentName, requestUri, insertUri); + Sone sone = webInterface.core().createSone(name, "Sone", requestUri, insertUri); /* log in the new Sone. */ setCurrentSone(request.getToadletContext(), sone);