if (message.length() > MAX_MESSAGE_LENGTH) {
errors.rejectValue("msg", null, "Слишком большое сообщение");
}
}
Screenshot scrn = null;
if (section!=null && groupPermissionService.isImagePostingAllowed(section, tmpl.getCurrentUser())) {
scrn = processUpload(session, image, errors);
if (section.isImagepost() && scrn == null && !errors.hasErrors()) {
errors.reject(null, "Изображение отсутствует");
}
}
Poll poll = null;
if (section!=null && section.isPollPostAllowed()) {
poll = preparePollPreview(form);
}
Topic previewMsg = null;
if (group!=null) {
previewMsg = new Topic(form, user, request.getRemoteAddr());
Image imageObject = null;
if (scrn!=null) {
imageObject = new Image(
0,
0,
"gallery/preview/" + scrn.getMainFile().getName(),
"gallery/preview/" + scrn.getIconFile().getName()
);
}
List<String> tagNames = TagName.parseAndSanitizeTags(form.getTags());