If no current Sone exists, return an error.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / ajax / GetStatusAjaxPage.java
index e43910c..a812a57 100644 (file)
@@ -64,9 +64,6 @@ public class GetStatusAjaxPage extends JsonPage {
                super("getStatus.ajax", webInterface);
        }
 
-       /**
-        * {@inheritDoc}
-        */
        @Override
        protected JsonReturnObject createJsonObject(FreenetRequest request) {
                final Sone currentSone = getCurrentSone(request.getToadletContext(), false);
@@ -137,17 +134,11 @@ public class GetStatusAjaxPage extends JsonPage {
                return createSuccessJsonObject().put("loggedIn", currentSone != null).put("options", createJsonOptions(currentSone)).put("sones", jsonSones).put("notificationHash", notifications.hashCode()).put("newPosts", jsonPosts).put("newReplies", jsonReplies);
        }
 
-       /**
-        * {@inheritDoc}
-        */
        @Override
        protected boolean needsFormPassword() {
                return false;
        }
 
-       /**
-        * {@inheritDoc}
-        */
        @Override
        protected boolean requiresLogin() {
                return false;
@@ -168,7 +159,7 @@ public class GetStatusAjaxPage extends JsonPage {
                ObjectNode jsonSone = new ObjectNode(instance);
                jsonSone.put("id", sone.getId());
                jsonSone.put("name", SoneAccessor.getNiceName(sone));
-               jsonSone.put("local", sone.getInsertUri() != null);
+               jsonSone.put("local", sone.isLocal());
                jsonSone.put("status", sone.getStatus().name());
                jsonSone.put("modified", webInterface.getCore().isModifiedSone(sone));
                jsonSone.put("locked", webInterface.getCore().isLocked(sone));