1.1 --- a/actions/EventAggregatorSummary.py Tue Mar 31 00:43:20 2009 +0200
1.2 +++ b/actions/EventAggregatorSummary.py Thu Apr 02 00:59:53 2009 +0200
1.3 @@ -13,6 +13,7 @@
1.4 from MoinMoin.action import ActionBase
1.5 from MoinMoin import config
1.6 from MoinMoin.Page import Page
1.7 +import MoinMoin.util # for MoinMoin 1.5.x
1.8 import EventAggregatorSupport
1.9
1.10 Dependencies = ['pages']
1.11 @@ -111,11 +112,12 @@
1.12 write_resource(self.request)
1.13 return 1, None
1.14
1.15 - def render_success(self, msg, msgtype):
1.16 + def render_success(self, msg, msgtype=None):
1.17
1.18 """
1.19 Render neither 'msg' nor 'msgtype' since a resource has already been
1.20 produced.
1.21 + NOTE: msgtype is optional because MoinMoin 1.5.x does not support it.
1.22 """
1.23
1.24 pass
1.25 @@ -157,7 +159,12 @@
1.26
1.27 # Output iCalendar data...
1.28
1.29 - request.emit_http_headers(["Content-Type: text/calendar; charset=%s" % config.charset])
1.30 + if EventAggregatorSupport.isMoin15():
1.31 + send_headers = request.http_headers
1.32 + else:
1.33 + send_headers = request.emit_http_headers
1.34 +
1.35 + send_headers(["Content-Type: text/calendar; charset=%s" % config.charset])
1.36
1.37 request.write("BEGIN:VCALENDAR\r\n")
1.38 request.write("PRODID:-//MoinMoin//EventAggregatorSummary\r\n")
1.39 @@ -205,6 +212,9 @@
1.40
1.41 request.write("END:VCALENDAR\r\n")
1.42
1.43 + if EventAggregatorSupport.isMoin15():
1.44 + raise MoinMoin.util.MoinMoinNoFooter
1.45 +
1.46 # Action function.
1.47
1.48 def execute(pagename, request):