# HG changeset patch # User Paul Boddie # Date 1238881248 -7200 # Node ID b3c675d6708454c67cd4b29133f70b860bfd29e0 # Parent 39ce8e50808bb77809398f3a886ae7618b4d2b05 Fixed the action where no events are to appear in the output. Introduced the getPageURL function which provides qualified URLs for all supported MoinMoin versions. diff -r 39ce8e50808b -r b3c675d67084 EventAggregatorSupport.py --- a/EventAggregatorSupport.py Sat Apr 04 23:27:16 2009 +0200 +++ b/EventAggregatorSupport.py Sat Apr 04 23:40:48 2009 +0200 @@ -680,4 +680,13 @@ else: return page.link_to_raw(request, text, query_string) +def getPageURL(request, page): + + "Using 'request', return the URL of 'page'." + + if isMoin15(): + return request.getQualifiedURL(page.url(request)) + else: + return request.getQualifiedURL(page.url(request, relative=0)) + # vim: tabstop=4 expandtab shiftwidth=4 diff -r 39ce8e50808b -r b3c675d67084 actions/EventAggregatorSummary.py --- a/actions/EventAggregatorSummary.py Sat Apr 04 23:27:16 2009 +0200 +++ b/actions/EventAggregatorSummary.py Sat Apr 04 23:40:48 2009 +0200 @@ -177,7 +177,9 @@ # Define the last modified time. - headers.append("Last-Modified: %s" % EventAggregatorSupport.getHTTPTimeString(latest_timestamp)) + if latest_timestamp is not None: + headers.append("Last-Modified: %s" % EventAggregatorSupport.getHTTPTimeString(latest_timestamp)) + send_headers(headers) # iCalendar output... @@ -192,7 +194,7 @@ # Get the summary details. event_summary = EventAggregatorSupport.getEventSummary(event_page, event_details) - link = request.getQualifiedURL(event_page.url(request, relative=0)) + link = EventAggregatorSupport.getPageURL(request, event_page) # Output the event details. @@ -232,7 +234,7 @@ # Get the summary details. event_summary = EventAggregatorSupport.getEventSummary(event_page, event_details) - link = request.getQualifiedURL(event_page.url(request, relative=0)) + link = EventAggregatorSupport.getPageURL(request, event_page) request.write('\r\n') request.write('%s\r\n' % wikiutil.escape(event_summary))