Fix creation at given URIs.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 29 Oct 2010 07:13:18 +0000 (09:13 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 29 Oct 2010 07:13:18 +0000 (09:13 +0200)
src/main/java/net/pterodactylus/sone/web/CreateSonePage.java

index f977556..dfd3760 100644 (file)
@@ -65,7 +65,7 @@ public class CreateSonePage extends SoneTemplatePage {
                String insertUri = null;
                if (request.getMethod() == Method.POST) {
                        name = request.getHttpRequest().getPartAsStringFailsafe("name", 100);
-                       if (request.getHttpRequest().getParam("create-from-uri").length() > 0) {
+                       if (request.getHttpRequest().isPartSet("create-from-uri")) {
                                requestUri = request.getHttpRequest().getPartAsStringFailsafe("request-uri", 256);
                                insertUri = request.getHttpRequest().getPartAsStringFailsafe("insert-uri", 256);
                        }