projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Only allow local Sones to log in.
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
web
/
UnfollowSonePage.java
diff --git
a/src/main/java/net/pterodactylus/sone/web/UnfollowSonePage.java
b/src/main/java/net/pterodactylus/sone/web/UnfollowSonePage.java
index
d4fd688
..
5b0c652
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/web/UnfollowSonePage.java
+++ b/
src/main/java/net/pterodactylus/sone/web/UnfollowSonePage.java
@@
-50,13
+50,10
@@
public class UnfollowSonePage extends SoneTemplatePage {
super.processTemplate(request, template);
if (request.getMethod() == Method.POST) {
String soneId = request.getHttpRequest().getPartAsStringFailsafe("sone", 44);
super.processTemplate(request, template);
if (request.getMethod() == Method.POST) {
String soneId = request.getHttpRequest().getPartAsStringFailsafe("sone", 44);
- String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage",
64
);
+ String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage",
256
);
Sone currentSone = getCurrentSone(request.getToadletContext());
Sone currentSone = getCurrentSone(request.getToadletContext());
- Sone sone = webInterface.core().getSone(soneId);
- if (!sone.equals(currentSone)) {
- currentSone.removeFriend(sone);
- webInterface.core().saveSone(currentSone);
- }
+ currentSone.removeFriend(soneId);
+ webInterface.getCore().saveSone(currentSone);
throw new RedirectException(returnPage);
}
}
throw new RedirectException(returnPage);
}
}