diff MoinMoin/action/AttachFile.py @ 4426:8982d8226218

pre-1.9: request.form has qs args and post data, 1.9: .form only post data, .args only qs args, .values both
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 18 Nov 2008 21:28:49 +0100
parents 62177a952833
children 253a1e691b19
line wrap: on
line diff
--- a/MoinMoin/action/AttachFile.py	Sun Nov 16 22:20:21 2008 +0100
+++ b/MoinMoin/action/AttachFile.py	Tue Nov 18 21:28:49 2008 +0100
@@ -394,14 +394,14 @@
 
     now = time.time()
     pubpath = request.cfg.url_prefix_static + "/applets/TWikiDrawPlugin"
-    basename = request.form['drawing']
+    basename = request.values['drawing']
     drawpath = getAttachUrl(pagename, basename + '.draw', request, escaped=1)
     pngpath = getAttachUrl(pagename, basename + '.png', request, escaped=1)
     pagelink = request.href(pagename, action=action_name, ts=now)
     helplink = Page(request, "HelpOnActions/AttachFile").url(request)
     savelink = request.href(pagename, action=action_name, do='savedrawing')
     #savelink = Page(request, pagename).url(request) # XXX include target filename param here for twisted
-                                           # request, {'savename': request.form['drawing']+'.draw'}
+                                           # request, {'savename': request.values['drawing']+'.draw'}
     #savelink = '/cgi-bin/dumpform.bat'
 
     timestamp = '&amp;ts=%s' % now
@@ -480,7 +480,7 @@
     if not writeable:
         request.write('<p>%s</p>' % _('You are not allowed to attach a file to this page.'))
 
-    if writeable and request.form.get('drawing'):
+    if writeable and request.values.get('drawing'):
         send_hotdraw(pagename, request)