1.1 --- a/EventAggregatorSupport.py Mon Oct 10 01:31:24 2011 +0200
1.2 +++ b/EventAggregatorSupport.py Fri Oct 14 00:35:47 2011 +0200
1.3 @@ -2745,6 +2745,8 @@
1.4 new_event = Event(new_event_page, event_details)
1.5 new_event_page.setEvents([new_event])
1.6 new_event_page.setCategoryMembership(category_pagenames)
1.7 - new_event_page.saveChanges()
1.8 + new_event_page.flushEventDetails()
1.9 +
1.10 + return new_event_page.getBody()
1.11
1.12 # vim: tabstop=4 expandtab shiftwidth=4
2.1 --- a/README.txt Mon Oct 10 01:31:24 2011 +0200
2.2 +++ b/README.txt Fri Oct 14 00:35:47 2011 +0200
2.3 @@ -298,6 +298,15 @@
2.4 time zone information for the correct interpretation of time information in
2.5 those summaries. Thus, it is highly recommended that pytz be installed.
2.6
2.7 +New in EventAggregator 0.8.1 (Changes since EventAggregator 0.8)
2.8 +----------------------------------------------------------------
2.9 +
2.10 + * Changed the EventAggregatorNewEvent action to not save new event pages
2.11 + directly, instead invoking the textual page editor for the page so that
2.12 + the page text can be changed and the page saved without a redundant
2.13 + initial version being created. Cancelling the editing operation will also
2.14 + avoid the creation of unwanted event pages.
2.15 +
2.16 New in EventAggregator 0.8 (Changes since EventAggregator 0.7.1)
2.17 ----------------------------------------------------------------
2.18
3.1 --- a/actions/EventAggregatorNewEvent.py Mon Oct 10 01:31:24 2011 +0200
3.2 +++ b/actions/EventAggregatorNewEvent.py Fri Oct 14 00:35:47 2011 +0200
3.3 @@ -674,14 +674,23 @@
3.4 if new_page.exists():
3.5 return 0, _("The specified page already exists. Please choose another name.")
3.6
3.7 - # Complete the new page.
3.8 + # Complete the new page and return its body.
3.9
3.10 - fillEventPageFromTemplate(template_page, new_page, event_details, category_pagenames)
3.11 + body = fillEventPageFromTemplate(template_page, new_page, event_details, category_pagenames)
3.12
3.13 - # Redirect and return success.
3.14 + # Open the page editor on the new page.
3.15 + # NOTE: Replacing the revision in the request to prevent Moin from
3.16 + # NOTE: attempting to use the queued changes page's revision.
3.17 + # NOTE: Replacing the action and page in the request to avoid issues
3.18 + # NOTE: with editing tickets.
3.19
3.20 - query = {'action' : 'edit'}
3.21 - request.http_redirect(new_page.url(request, query))
3.22 + request.rev = 0
3.23 + request.action = "edit"
3.24 + request.page = new_page
3.25 + new_page.sendEditor(preview=body, staytop=True)
3.26 +
3.27 + # Return success.
3.28 +
3.29 return 1, None
3.30
3.31 # Action function.