From e2cae8504eea6b4c833e9aa87ccd70d897e5f0f2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 16 Oct 2010 18:02:23 +0200 Subject: [PATCH] =?utf8?q?Don=E2=80=99t=20add=20the=20new=20Post=20to=20th?= =?utf8?q?e=20Sone=20ourselves,=20Core=20does=20that.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/sone/web/CreatePostPage.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/web/CreatePostPage.java b/src/main/java/net/pterodactylus/sone/web/CreatePostPage.java index 58fd74e..bed96a4 100644 --- a/src/main/java/net/pterodactylus/sone/web/CreatePostPage.java +++ b/src/main/java/net/pterodactylus/sone/web/CreatePostPage.java @@ -53,8 +53,7 @@ public class CreatePostPage extends SoneTemplatePage { String text = request.getHttpRequest().getPartAsStringFailsafe("text", 65536).trim(); if (text.length() != 0) { Sone currentSone = getCurrentSone(request.getToadletContext()); - Post post = webInterface.core().createPost(currentSone, System.currentTimeMillis(), text); - currentSone.addPost(post); + webInterface.core().createPost(currentSone, System.currentTimeMillis(), text); throw new RedirectException("index.html"); } template.set("errorTextEmpty", true); -- 2.7.4