comparison MoinMoin/action/backup.py @ 4424:5ad5753ae311

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 Sun, 16 Nov 2008 22:20:21 +0100
parents e88baf535b48
children 41f1c2922ae7
comparison
equal deleted inserted replaced
4423:135d4a7dc09d 4424:5ad5753ae311
52 def sendBackupForm(request, pagename): 52 def sendBackupForm(request, pagename):
53 _ = request.getText 53 _ = request.getText
54 request.emit_http_headers() 54 request.emit_http_headers()
55 request.setContentLanguage(request.lang) 55 request.setContentLanguage(request.lang)
56 title = _('Wiki Backup') 56 title = _('Wiki Backup')
57 request.theme.send_title(title, form=request.form, pagename=pagename) 57 request.theme.send_title(title, pagename=pagename)
58 request.write(request.formatter.startContent("content")) 58 request.write(request.formatter.startContent("content"))
59 59
60 request.write(_("""= Downloading a backup = 60 request.write(_("""= Downloading a backup =
61 61
62 Please note: 62 Please note:
101 _ = request.getText 101 _ = request.getText
102 if not backupAllowed(request): 102 if not backupAllowed(request):
103 return sendMsg(request, pagename, 103 return sendMsg(request, pagename,
104 msg=_('You are not allowed to do remote backup.'), msgtype="error") 104 msg=_('You are not allowed to do remote backup.'), msgtype="error")
105 105
106 dowhat = request.form.get('do', [None])[0] 106 dowhat = request.form.get('do')
107 if dowhat == 'backup': 107 if dowhat == 'backup':
108 sendBackup(request) 108 sendBackup(request)
109 elif dowhat is None: 109 elif dowhat is None:
110 sendBackupForm(request, pagename) 110 sendBackupForm(request, pagename)
111 else: 111 else: