1110 : Balance carts and lists, follow-up : Added Opac lists features to admin lists
[koha.git] / reports / guided_reports.pl
index 89b4bfc..ad1ba6f 100755 (executable)
@@ -340,8 +340,6 @@ elsif ( $phase eq 'Save Report' ) {
 }
 
 elsif ($phase eq 'Run this report'){
-    binmode STDOUT, ':utf8';
-
     # execute a saved report
     my $limit  = 20;    # page size. # TODO: move to DB or syspref?
     my $offset = 0;
@@ -386,10 +384,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"