Skip to content

Commit 7a58c42

Browse files
author
Richard Jones
committed
fixed CSV export and CGI actions returning results
1 parent 8b58f65 commit 7a58c42

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

CHANGES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ are given with the most recent entry first.
33

44
2004-??-?? 0.7.0
55
Fixed:
6-
- CSV export was busted
6+
- CSV export was busted (as was any action returning a result)
77
- MultiMapping deviated from the Zope C implementation in a number of
88
places (thanks Toby Sargeant)
99

roundup/cgi/actions.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#$Id: actions.py,v 1.20 2004-03-29 21:56:56 richard Exp $
1+
#$Id: actions.py,v 1.21 2004-03-30 06:43:08 richard Exp $
22

33
import re, cgi, StringIO, urllib, Cookie, time, random
44

@@ -31,7 +31,7 @@ def __init__(self, client):
3131
def execute(self):
3232
"""Execute the action specified by this object."""
3333
self.permission()
34-
self.handle()
34+
return self.handle()
3535

3636
name = ''
3737
permissionType = None
@@ -833,7 +833,7 @@ class ExportCSVAction(Action):
833833
def handle(self):
834834
''' Export the specified search query as CSV. '''
835835
# figure the request
836-
request = templating.HTMLRequest(self)
836+
request = templating.HTMLRequest(self.client)
837837
filterspec = request.filterspec
838838
sort = request.sort
839839
group = request.group
@@ -847,12 +847,12 @@ def handle(self):
847847
else:
848848
matches = None
849849

850-
h = self.additional_headers
850+
h = self.client.additional_headers
851851
h['Content-Type'] = 'text/csv'
852852
# some browsers will honor the filename here...
853853
h['Content-Disposition'] = 'inline; filename=query.csv'
854-
self.header()
855-
writer = rcsv.writer(self.request.wfile)
854+
self.client.header()
855+
writer = rcsv.writer(self.client.request.wfile)
856856
writer.writerow(columns)
857857

858858
# and search

0 commit comments

Comments
 (0)