changeset 4572:30cc750e28b4

action.backup: Because of API chnges emit_http_headers removed for the form of sendBackupForm and replaced by request.headers.add for sendBackup.
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Thu, 12 Feb 2009 22:21:58 +0100
parents 41f1c2922ae7
children 95dc19f1ea75
files MoinMoin/action/backup.py
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/backup.py	Thu Feb 12 15:20:27 2009 +0100
+++ b/MoinMoin/action/backup.py	Thu Feb 12 22:21:58 2009 +0100
@@ -37,10 +37,8 @@
     """ Send compressed tar file """
     dateStamp = time.strftime("%Y-%m-%d--%H-%M-%S-UTC", time.gmtime())
     filename = "%s-%s.tar.%s" % (request.cfg.siteid, dateStamp, request.cfg.backup_compression)
-    request.emit_http_headers([
-        'Content-Type: application/octet-stream',
-        'Content-Disposition: inline; filename="%s"' % filename, ])
-
+    request.headers.add('Content-Disposition', '%s; filename="%s"' %
+                        ('application/octet-stream', filename))
     tar = tarfile.open(fileobj=request, mode="w|%s" % request.cfg.backup_compression)
     # allow GNU tar's longer file/pathnames
     tar.posix = False
@@ -51,7 +49,6 @@
 
 def sendBackupForm(request, pagename):
     _ = request.getText
-    request.emit_http_headers()
     request.setContentLanguage(request.lang)
     title = _('Wiki Backup')
     request.theme.send_title(title, pagename=pagename)