From 3d3d06d95ff53fdf16cce4331a0cdd7c77427fc4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 23 Oct 2010 22:40:39 +0200 Subject: [PATCH] =?utf8?q?Hardcode=20document=20name=20for=20Sone=20SSKs?= =?utf8?q?=20to=20=E2=80=9CSone=E2=80=9D.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/sone/core/Core.java | 2 +- src/main/java/net/pterodactylus/sone/web/CreateSonePage.java | 7 +------ src/main/resources/templates/include/createSone.html | 5 ----- 3 files changed, 2 insertions(+), 12 deletions(-) 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 @@