if (daysBack < 1) {\r
daysBack = 7;\r
}\r
+ PageParameters clonedParams;;\r
+ if (params == null) {\r
+ clonedParams = new PageParameters();\r
+ } else {\r
+ clonedParams = new PageParameters(params);\r
+ }\r
+ \r
+ if (!clonedParams.containsKey("db")) {\r
+ clonedParams.put("db", daysBack);\r
+ }\r
+ \r
List<DropDownMenuItem> items = new ArrayList<DropDownMenuItem>();\r
Set<Integer> choicesSet = new TreeSet<Integer>(GitBlit.getIntegers(Keys.web.activityDurationChoices));\r
if (choicesSet.isEmpty()) {\r
String lastDaysPattern = getString("gb.lastNDays");\r
for (Integer db : choices) {\r
String txt = MessageFormat.format(lastDaysPattern, db);\r
- items.add(new DropDownMenuItem(txt, "db", db.toString(), params));\r
+ items.add(new DropDownMenuItem(txt, "db", db.toString(), clonedParams));\r
}\r
items.add(new DropDownMenuItem());\r
return items;\r