diff MoinMoin/action/Despam.py @ 2966:ba14d391c2ba

Refactor all modules to use the new add_msg interface in 1.7 (done by Frederico Lorenzi). Should not be backported to 1.6 but instead the separate patch from http://code.google.com/p/google-highly-open-participation-moinmoin/issues/detail?id=51 should be used.
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Sun, 23 Dec 2007 23:52:43 +0100
parents 01f05e74aa9c
children 92e5cf67842f
line wrap: on
line diff
--- a/MoinMoin/action/Despam.py	Sun Dec 23 23:51:55 2007 +0100
+++ b/MoinMoin/action/Despam.py	Sun Dec 23 23:52:43 2007 +0100
@@ -165,8 +165,8 @@
     actname = __name__.split('.')[-1]
     if actname in request.cfg.actions_excluded or \
        not request.user.isSuperUser():
-        return Page.Page(request, pagename).send_page(
-            msg=_('You are not allowed to use this action.'))
+        request.theme.add_msg(_('You are not allowed to use this action.'), "error")
+        return Page.Page(request, pagename).send_page()
 
     editor = request.form.get('editor', [None])[0]
     timestamp = time.time() - 24 * 3600