projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Extract some functionality into their own methods.
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
web
/
ajax
/
GetTimesAjaxPage.java
diff --git
a/src/main/java/net/pterodactylus/sone/web/ajax/GetTimesAjaxPage.java
b/src/main/java/net/pterodactylus/sone/web/ajax/GetTimesAjaxPage.java
index
0c78bb6
..
bd51679
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/web/ajax/GetTimesAjaxPage.java
+++ b/
src/main/java/net/pterodactylus/sone/web/ajax/GetTimesAjaxPage.java
@@
-52,9
+52,6
@@
public class GetTimesAjaxPage extends JsonPage {
super("getTimes.ajax", webInterface);
}
super("getTimes.ajax", webInterface);
}
- /**
- * {@inheritDoc}
- */
@Override
protected JsonReturnObject createJsonObject(FreenetRequest request) {
String allIds = request.getHttpRequest().getParam("posts");
@Override
protected JsonReturnObject createJsonObject(FreenetRequest request) {
String allIds = request.getHttpRequest().getParam("posts");
@@
-62,7
+59,7
@@
public class GetTimesAjaxPage extends JsonPage {
if (allIds.length() > 0) {
String[] ids = allIds.split(",");
for (String id : ids) {
if (allIds.length() > 0) {
String[] ids = allIds.split(",");
for (String id : ids) {
- Optional<Post> post = webInterface.getCore().getPost(id);
+ Optional<Post> post = webInterface.getCore().get
Database().get
Post(id);
if (!post.isPresent()) {
continue;
}
if (!post.isPresent()) {
continue;
}
@@
-81,7
+78,7
@@
public class GetTimesAjaxPage extends JsonPage {
if (allIds.length() > 0) {
String[] ids = allIds.split(",");
for (String id : ids) {
if (allIds.length() > 0) {
String[] ids = allIds.split(",");
for (String id : ids) {
- Optional<PostReply> reply = webInterface.getCore().getPostReply(id);
+ Optional<PostReply> reply = webInterface.getCore().get
Database().get
PostReply(id);
if (!reply.isPresent()) {
continue;
}
if (!reply.isPresent()) {
continue;
}
@@
-98,17
+95,11
@@
public class GetTimesAjaxPage extends JsonPage {
return createSuccessJsonObject().put("postTimes", postTimes).put("replyTimes", replyTimes);
}
return createSuccessJsonObject().put("postTimes", postTimes).put("replyTimes", replyTimes);
}
- /**
- * {@inheritDoc}
- */
@Override
protected boolean needsFormPassword() {
return false;
}
@Override
protected boolean needsFormPassword() {
return false;
}
- /**
- * {@inheritDoc}
- */
@Override
protected boolean requiresLogin() {
return false;
@Override
protected boolean requiresLogin() {
return false;