if (offset != 0) {
firstPage = false;
if (offset < 0) {
throw new ServletParameterBadValueException("offset", "offset не может быть отрицательным");
}
if (year == null && offset>MAX_OFFSET) {
return new ModelAndView(new RedirectView(group.getUrl()+"archive"));
}
} else {
firstPage = true;
}
params.put("firstPage", firstPage);
params.put("offset", offset);
params.put("prevPage", offset - tmpl.getProf().getTopics());
params.put("nextPage", offset + tmpl.getProf().getTopics());
params.put("lastmod", lastmod);
boolean showIgnored = false;
if (request.getParameter("showignored") != null) {
showIgnored = "t".equals(request.getParameter("showignored"));
}
params.put("showIgnored", showIgnored);
params.put("group", group);
if(group.getImage() != null) {
try {
params.put("groupImagePath", '/' + "tango" + group.getImage());
ImageInfo info = new ImageInfo(siteConfig.getHTMLPathPrefix() + "tango" + group.getImage());
params.put("groupImageInfo", info);
} catch (BadImageException ex) {
params.put("groupImagePath", null);
params.put("groupImageInfo", null);
}
} else {
params.put("groupImagePath", null);
params.put("groupImageInfo", null);
}
params.put("section", section);
params.put("groupInfo", prepareService.prepareGroupInfo(group, request.isSecure()));
if (year!=null) {
if (year<1990 || year > 3000) {
throw new ServletParameterBadValueException("year", "указан некорректный год");
}
if (month<1 || month > 12) {
throw new ServletParameterBadValueException("month", "указан некорректный месяц");
}
params.put("year", year);
params.put("month", month);
params.put("url", group.getUrl()+year+ '/' +month+ '/');