From c9dfdab1c3d57ebbce513ca437b52690a9f086ab Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 13 Nov 2010 11:17:05 +0100 Subject: [PATCH] =?utf8?q?Don=E2=80=99t=20create=20a=20new=20Sone=20when?= =?utf8?q?=20getting=20the=20logged=20in=20Sone.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java | 2 +- src/main/java/net/pterodactylus/sone/web/ajax/JsonPage.java | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java b/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java index 2953b0d..33c86a9 100644 --- a/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java +++ b/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java @@ -137,7 +137,7 @@ public class SoneTemplatePage extends TemplatePage { if (soneId == null) { return null; } - return webInterface.getCore().getLocalSone(soneId); + return webInterface.getCore().getLocalSone(soneId, false); } /** diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/JsonPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/JsonPage.java index 27fa081..8e7d27e 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/JsonPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/JsonPage.java @@ -112,12 +112,7 @@ public abstract class JsonPage implements Page { if (soneId == null) { return null; } - for (Sone sone : webInterface.getCore().getSones()) { - if (sone.getId().equals(soneId)) { - return sone; - } - } - return null; + return webInterface.getCore().getLocalSone(soneId, false); } // -- 2.7.4