changeset 2163:791c66a3b738

fixed CSV export and CGI actions returning results
author Richard Jones <richard@users.sourceforge.net>
date Tue, 30 Mar 2004 06:43:08 +0000
parents 53c600091f17
children 29c1e33d9d66
files CHANGES.txt roundup/cgi/actions.py
diffstat 2 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- 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)
 
--- 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

Roundup Issue Tracker: http://roundup-tracker.org/