changeset 116:4891dc042095

arnica_slides: fix wrong leading msg when called with macro Action.
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Fri, 27 Jun 2008 09:49:14 +0200
parents 0035c8757d44
children eb46d3641b93
files data/plugin/action/arnica_slides.py
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/action/arnica_slides.py	Fri Jun 27 08:47:49 2008 +0200
+++ b/data/plugin/action/arnica_slides.py	Fri Jun 27 09:49:14 2008 +0200
@@ -419,9 +419,15 @@
         elif command == 'view':
             send_cache_file(request, pagename, arena_dir, target)
 
-        elif request.user.may.delete(pagename) and request.request_method == 'POST':
         # only users which are allowed to delete should use this tool
-        # ToDo besides lots of refactoring, logig when what is needed has to be rechecked
+        elif request.user.may.delete(pagename):
+            # only POST continues
+            if not request.request_method == 'POST':
+                msg = _('Missing parameters or GET method used')
+                request.theme.add_msg(msg, "error")
+                self.page.send_page()
+                return
+
             filename, ext = os.path.splitext(target)
 
             if ext in ('.gif', '.png'):