# HG changeset patch # User Richard Jones # Date 1080628988 0 # Node ID 791c66a3b738ed6cd25e3755b79d5f906ec44915 # Parent 53c600091f175007fb6e8c6cdba65cf780503011 fixed CSV export and CGI actions returning results diff -r 53c600091f17 -r 791c66a3b738 CHANGES.txt --- a/CHANGES.txt Tue Mar 30 06:35:33 2004 +0000 +++ b/CHANGES.txt Tue Mar 30 06:43:08 2004 +0000 @@ -3,7 +3,7 @@ 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 -r 53c600091f17 -r 791c66a3b738 roundup/cgi/actions.py --- a/roundup/cgi/actions.py Tue Mar 30 06:35:33 2004 +0000 +++ b/roundup/cgi/actions.py Tue Mar 30 06:43:08 2004 +0000 @@ -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 @@ def execute(self): """Execute the action specified by this object.""" self.permission() - self.handle() + return self.handle() name = '' permissionType = None @@ -833,7 +833,7 @@ 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 @@ 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