comparison data/plugin/action/loadactions.py @ 622:12465aa315be

add code from ActionMarket/FormSubmit (form_submit-1.7.tar.gz) - outdated code for moin 1.7/1.8
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 25 Mar 2013 17:09:15 +0100
parents
children 5f499a634857
comparison
equal deleted inserted replaced
621:a8d1eb833705 622:12465aa315be
1 # -*- coding: iso-8859-1 -*-
2
3 """
4 MoinMoin - loadactions Action
5
6 Triggers multiple actions at once.
7 Actions are defined in actions[] CGI parameter,
8 where actions[] is array of action names.
9
10 @copyright: 2008 by Peter Bodi <petrdll@centrum.sk>
11 @license: GNU GPL, see COPYING for details.
12 """
13
14 import os, sys
15
16 from MoinMoin import wikiutil
17 from MoinMoin.Page import Page
18 from MoinMoin.action import ActionBase
19 from MoinMoin.action import getHandler
20
21 from submitbase import SubmitError
22
23 def execute(pagename, request):
24 for action in request.form.get("actions[]"):
25 handler = getHandler(request, action)
26 try:
27 handler(pagename, request)
28 except SubmitError:
29 # Stop executing next actions while there is an error
30 break
31