bug 2540: allow download of report
authorGalen Charlton <galen.charlton@liblime.com>
Thu, 21 Aug 2008 15:48:31 +0000 (10:48 -0500)
committerChris Cormack <chris@bigballofwax.co.nz>
Thu, 3 Sep 2009 22:28:19 +0000 (10:28 +1200)
$error return C4::Reports::execute_query is
always defined.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
reports/guided_reports.pl

index 89b4bfc..c1b9694 100755 (executable)
@@ -386,10 +386,10 @@ elsif ($phase eq 'Run this report'){
 elsif ($phase eq 'Export'){
     binmode STDOUT, ':utf8';
 
-       # export results to tab separated text or CSV
-       my $sql    = $input->param('sql');  # FIXME: use sql from saved report ID#, not new user-supplied SQL!
+    # export results to tab separated text or CSV
+    my $sql    = $input->param('sql');  # FIXME: use sql from saved report ID#, not new user-supplied SQL!
     my $format = $input->param('format');
-       my ($sth, $q_errors) = execute_query($sql);
+    my ($sth, $q_errors) = execute_query($sql);
     unless ($q_errors and @$q_errors) {
         print $input->header(       -type => 'application/octet-stream',
                                     -attachment=>"reportresults.$format"