From: David ‘Bombe’ Roden Date: Sat, 23 Oct 2010 20:40:39 +0000 (+0200) Subject: Hardcode document name for Sone SSKs to “Sone”. X-Git-Tag: 0.1-RC1~52 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=3d3d06d95ff53fdf16cce4331a0cdd7c77427fc4;p=Sone.git Hardcode document name for Sone SSKs to “Sone”. --- diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index a3c8dc4..56e60d4 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -322,7 +322,7 @@ public class Core extends AbstractService { * if a Sone error occurs */ public Sone createSone(String name) throws SoneException { - return createSone(name, "Sone-" + name, null, null); + return createSone(name, "Sone", null, null); } /** diff --git a/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java b/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java index 901874c..f67cd56 100644 --- a/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java +++ b/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java @@ -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); diff --git a/src/main/resources/templates/include/createSone.html b/src/main/resources/templates/include/createSone.html index f2777c3..d812b1a 100644 --- a/src/main/resources/templates/include/createSone.html +++ b/src/main/resources/templates/include/createSone.html @@ -1,7 +1,6 @@