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 sone = webInterface.core().getSone(soneId);
- if (!sone.equals(currentSone)) {
- currentSone.removeFriend(sone);
- }
+ currentSone.removeFriend(soneId);
+ webInterface.getCore().saveSone(currentSone);
throw new RedirectException(returnPage);
}
}