1.1 --- a/actions/EventAggregatorNewEvent.py Mon Oct 10 01:31:24 2011 +0200
1.2 +++ b/actions/EventAggregatorNewEvent.py Fri Oct 14 00:35:47 2011 +0200
1.3 @@ -674,14 +674,23 @@
1.4 if new_page.exists():
1.5 return 0, _("The specified page already exists. Please choose another name.")
1.6
1.7 - # Complete the new page.
1.8 + # Complete the new page and return its body.
1.9
1.10 - fillEventPageFromTemplate(template_page, new_page, event_details, category_pagenames)
1.11 + body = fillEventPageFromTemplate(template_page, new_page, event_details, category_pagenames)
1.12
1.13 - # Redirect and return success.
1.14 + # Open the page editor on the new page.
1.15 + # NOTE: Replacing the revision in the request to prevent Moin from
1.16 + # NOTE: attempting to use the queued changes page's revision.
1.17 + # NOTE: Replacing the action and page in the request to avoid issues
1.18 + # NOTE: with editing tickets.
1.19
1.20 - query = {'action' : 'edit'}
1.21 - request.http_redirect(new_page.url(request, query))
1.22 + request.rev = 0
1.23 + request.action = "edit"
1.24 + request.page = new_page
1.25 + new_page.sendEditor(preview=body, staytop=True)
1.26 +
1.27 + # Return success.
1.28 +
1.29 return 1, None
1.30
1.31 # Action function.