1.1 --- a/actions/EventAggregatorSummary.py Wed Feb 16 00:52:49 2011 +0100
1.2 +++ b/actions/EventAggregatorSummary.py Wed Feb 16 01:11:14 2011 +0100
1.3 @@ -250,21 +250,27 @@
1.4 parent = form.get("parent", [""])[0]
1.5 resolution = form.get("resolution", ["month"])[0]
1.6
1.7 - calendar_start = resolution == "date" and EventAggregatorSupport.getFormDate(request, None, "start") or \
1.8 - resolution == "month" and EventAggregatorSupport.getFormMonth(request, None, "start")
1.9 - calendar_end = resolution == "date" and EventAggregatorSupport.getFormDate(request, None, "end") or \
1.10 - resolution == "month" and EventAggregatorSupport.getFormMonth(request, None, "end")
1.11 + # Look first for a single start and end parameter. If that fails to provide
1.12 + # dates, look for separate start and end parameters, either for complete
1.13 + # dates or for years and months.
1.14
1.15 - # Look for separate start and end parameters, either for complete dates
1.16 - # or for years and months.
1.17 + if resolution == "date":
1.18 + calendar_start = EventAggregatorSupport.getFormDate(request, None, "start")
1.19 + calendar_end = EventAggregatorSupport.getFormDate(request, None, "end")
1.20
1.21 - if calendar_start is None:
1.22 - calendar_start = EventAggregatorSupport.getFormDateTriple(request, "start-year", "start-month", "start-day") or \
1.23 - EventAggregatorSupport.getFormMonthPair(request, "start-year", "start-month")
1.24 + if calendar_start is None:
1.25 + calendar_start = EventAggregatorSupport.getFormDateTriple(request, "start-year", "start-month", "start-day")
1.26 + if calendar_end is None:
1.27 + calendar_end = EventAggregatorSupport.getFormDateTriple(request, "end-year", "end-month", "end-day")
1.28
1.29 - if calendar_end is None:
1.30 - calendar_end = EventAggregatorSupport.getFormDateTriple(request, "end-year", "end-month", "end-day") or \
1.31 - EventAggregatorSupport.getFormMonthPair(request, "end-year", "end-month")
1.32 + elif resolution == "month":
1.33 + calendar_start = EventAggregatorSupport.getFormMonth(request, None, "start")
1.34 + calendar_end = EventAggregatorSupport.getFormMonth(request, None, "end")
1.35 +
1.36 + if calendar_start is None:
1.37 + calendar_start = EventAggregatorSupport.getFormMonthPair(request, "start-year", "start-month")
1.38 + if calendar_end is None:
1.39 + calendar_end = EventAggregatorSupport.getFormMonthPair(request, "end-year", "end-month")
1.40
1.41 # Determine the period and get the events involved.
1.42