super.processTemplate(request, template);
String text = request.getHttpRequest().getPartAsStringFailsafe("text", 65536).trim();
if (text.length() != 0) {
super.processTemplate(request, template);
String text = request.getHttpRequest().getPartAsStringFailsafe("text", 65536).trim();
if (text.length() != 0) {
- Post post = new Post(System.currentTimeMillis(), text);
- getCurrentSone(request.getToadletContext()).addPost(post);
+ Sone currentSone = getCurrentSone(request.getToadletContext());
+ webInterface.core().createPost(currentSone, System.currentTimeMillis(), text);
throw new RedirectException("index.html");
}
template.set("errorTextEmpty", true);
throw new RedirectException("index.html");
}
template.set("errorTextEmpty", true);