super("getStatus.ajax", webInterface);
}
- /**
- * {@inheritDoc}
- */
@Override
protected JsonReturnObject createJsonObject(FreenetRequest request) {
final Sone currentSone = getCurrentSone(request.getToadletContext(), false);
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;
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));