Bug 27049: Add /misc/cronjobs/writeoff_debts.pl
[koha-ffzg.git] / reports / bor_issues_top.pl
index e2f6989..90b6b49 100755 (executable)
@@ -43,7 +43,7 @@ plugin that shows a stats on borrowers
 
 $debug and open my $debugfh, '>', '/tmp/bor_issues_top.debug.log';
 
-my $input = new CGI;
+my $input = CGI->new;
 my $fullreportname = "reports/bor_issues_top.tt";
 my $do_it   = $input->param('do_it');
 my $limit   = $input->param("Limit");
@@ -58,11 +58,10 @@ my ($template, $borrowernumber, $cookie)
     = get_template_and_user({template_name => $fullreportname,
                 query => $input,
                 type => "intranet",
-                authnotrequired => 0,
                 flagsrequired => {reports => '*'},
                 debug => 1,
                 });
-our $sep     = $input->param("sep") || C4::Context->preference('delimiter') || ',';
+our $sep     = $input->param("sep") || C4::Context->preference('CSVDelimiter') || ',';
 $sep = "\t" if ($sep eq 'tabulation');
 $template->param(do_it => $do_it,
         );
@@ -242,7 +241,7 @@ sub calculate {
                        $columns{($row[0] ||'NULL')}++;
             push @loopcol, { coltitle => $row[0] || 'NULL' };
         }
-               $debug and print $debugfh "full array: ", Dumper(\%columns), "\n";
+        $debug and print $debugfh "full array: ", Dumper(\%columns), "\n";
     }else{
         $columns{''} = 1;
     }