EventAggregator

Changeset

433:73780bf1bd76
2014-03-30 Paul Boddie raw files shortlog changelog graph Merged changes from the default branch. caching-pageparams
     1.1 --- a/parsers/calendar.py	Sun Mar 30 20:39:59 2014 +0200
     1.2 +++ b/parsers/calendar.py	Sun Mar 30 20:44:05 2014 +0200
     1.3 @@ -6,7 +6,7 @@
     1.4      @license: GNU GPL (v2 or later), see COPYING.txt for details.
     1.5  """
     1.6  
     1.7 -from MoinSupport import parseAttributes, RawParser
     1.8 +from MoinSupport import parseAttributes, RawParser, getPageURL
     1.9  from EventAggregatorSupport.Formatting import formatEventsForOutputType, \
    1.10                                                formatEvent
    1.11  from EventAggregatorSupport.Types import parseEventsInCalendar
    1.12 @@ -51,7 +51,7 @@
    1.13          using the request.
    1.14          """
    1.15  
    1.16 -        for event in parseEventsInCalendar(self.raw).getEvents():
    1.17 +        for event in parseEventsInCalendar(self.raw, getPageURL(self.request.page)).getEvents():
    1.18              formatEvent(event, self.request, fmt, write=write, parser_cls=RawParser)
    1.19  
    1.20      # Extra API methods.
    1.21 @@ -69,7 +69,7 @@
    1.22          if mimetype == "text/calendar":
    1.23              (write or request.write)(self.raw)
    1.24          else:
    1.25 -            events = parseEventsInCalendar(self.raw).getEvents()
    1.26 +            events = parseEventsInCalendar(self.raw, getPageURL(self.request.page)).getEvents()
    1.27              formatEventsForOutputType(events, self.request, mimetype, write=write)
    1.28  
    1.29      # Class methods.
     2.1 --- a/parsers/xcalendar.py	Sun Mar 30 20:39:59 2014 +0200
     2.2 +++ b/parsers/xcalendar.py	Sun Mar 30 20:44:05 2014 +0200
     2.3 @@ -6,7 +6,7 @@
     2.4      @license: GNU GPL (v2 or later), see COPYING.txt for details.
     2.5  """
     2.6  
     2.7 -from MoinSupport import parseAttributes, RawParser
     2.8 +from MoinSupport import parseAttributes, RawParser, getPageURL
     2.9  from EventAggregatorSupport.Formatting import formatEventsForOutputType, \
    2.10                                                formatEvent
    2.11  from EventAggregatorSupport.Types import parseEventsInXMLCalendar
    2.12 @@ -51,7 +51,7 @@
    2.13          using the request.
    2.14          """
    2.15  
    2.16 -        for event in parseEventsInXMLCalendar(self.raw).getEvents():
    2.17 +        for event in parseEventsInXMLCalendar(self.raw, getPageURL(self.request.page)).getEvents():
    2.18              formatEvent(event, self.request, fmt, write=write, parser_cls=RawParser)
    2.19  
    2.20      # Extra API methods.
    2.21 @@ -69,7 +69,7 @@
    2.22          if mimetype == "application/calendar+xml":
    2.23              (write or request.write)(self.raw)
    2.24          else:
    2.25 -            events = parseEventsInXMLCalendar(self.raw).getEvents()
    2.26 +            events = parseEventsInXMLCalendar(self.raw, getPageURL(self.request.page)).getEvents()
    2.27              formatEventsForOutputType(events, self.request, mimetype, write=write)
    2.28  
    2.29      # Class methods.