From 1a5c710826f7cc82d728c4fe59a0873157a0fe6f Mon Sep 17 00:00:00 2001 From: richard Date: Tue, 30 Mar 2004 06:43:08 +0000 Subject: [PATCH] fixed CSV export and CGI actions returning results git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2233 57a73879-2fb5-44c3-a270-3262357dd7e2 --- CHANGES.txt | 2 +- roundup/cgi/actions.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 2d5748c..3dbe83b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,7 +3,7 @@ are given with the most recent entry first. 2004-??-?? 0.7.0 Fixed: -- CSV export was busted +- CSV export was busted (as was any action returning a result) - MultiMapping deviated from the Zope C implementation in a number of places (thanks Toby Sargeant) diff --git a/roundup/cgi/actions.py b/roundup/cgi/actions.py index d506110..7bd678d 100755 --- a/roundup/cgi/actions.py +++ b/roundup/cgi/actions.py @@ -1,4 +1,4 @@ -#$Id: actions.py,v 1.20 2004-03-29 21:56:56 richard Exp $ +#$Id: actions.py,v 1.21 2004-03-30 06:43:08 richard Exp $ import re, cgi, StringIO, urllib, Cookie, time, random @@ -31,7 +31,7 @@ class Action: def execute(self): """Execute the action specified by this object.""" self.permission() - self.handle() + return self.handle() name = '' permissionType = None @@ -833,7 +833,7 @@ class ExportCSVAction(Action): def handle(self): ''' Export the specified search query as CSV. ''' # figure the request - request = templating.HTMLRequest(self) + request = templating.HTMLRequest(self.client) filterspec = request.filterspec sort = request.sort group = request.group @@ -847,12 +847,12 @@ class ExportCSVAction(Action): else: matches = None - h = self.additional_headers + h = self.client.additional_headers h['Content-Type'] = 'text/csv' # some browsers will honor the filename here... h['Content-Disposition'] = 'inline; filename=query.csv' - self.header() - writer = rcsv.writer(self.request.wfile) + self.client.header() + writer = rcsv.writer(self.client.request.wfile) writer.writerow(columns) # and search -- 2.30.2