From: David ‘Bombe’ Roden Date: Sat, 16 Oct 2010 16:02:23 +0000 (+0200) Subject: Don’t add the new Post to the Sone ourselves, Core does that. X-Git-Tag: 0.1-RC1~264 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=e2cae8504eea6b4c833e9aa87ccd70d897e5f0f2;p=Sone.git Don’t add the new Post to the Sone ourselves, Core does that. --- 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);