[Koha-patches] [PATCH] bug 2540: allow download of report

Galen Charlton galen.charlton at liblime.com
Thu Aug 21 17:48:31 CEST 2008


$error return C4::Reports::execute_query is
always defined.
---
 reports/guided_reports.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl
index 9d80314..0c5d94b 100755
--- a/reports/guided_reports.pl
+++ b/reports/guided_reports.pl
@@ -399,7 +399,7 @@ elsif ($phase eq 'Export'){
 	my $sql = $input->param('sql');
         my $format = $input->param('format');
 	my ($results, $total, $errors) = execute_query($sql,1,0,0,$format);
-        if (!defined($errors)) {
+        if ($#$errors == -1) {
             $no_html=1;
             print $input->header(       -type => 'application/octet-stream',
                                         -attachment=>'reportresults.csv'
-- 
1.5.5.GIT




More information about the Koha-patches mailing list