X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=reports%2Fcatalogue_out.pl;h=51961790a8698704cda5f9d942d42a69a3f4fe3d;hb=9d6d641d1f8b77271800f43bc027b651f9aea52b;hp=7713b14d1b4002031366da5a82d15a88b5973412;hpb=b168f4a2e9a03ed56ce857353d4dde940980caba;p=srvgit diff --git a/reports/catalogue_out.pl b/reports/catalogue_out.pl index 7713b14d1b..51961790a8 100755 --- a/reports/catalogue_out.pl +++ b/reports/catalogue_out.pl @@ -20,12 +20,10 @@ use Modern::Perl; use CGI qw ( -utf8 ); -use C4::Auth; +use C4::Auth qw( get_template_and_user ); use C4::Context; -use C4::Debug; -use C4::Output; +use C4::Output qw( output_html_with_http_headers ); # use Date::Manip; # TODO: add not borrowed since date X criteria -use Data::Dumper; =head1 catalogue_out @@ -33,7 +31,7 @@ Report that shows unborrowed items. =cut -my $input = new CGI; +my $input = CGI->new; my $do_it = $input->param('do_it'); my $limit = $input->param("Limit") || 10; my $column = $input->param("Criteria"); @@ -44,9 +42,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( template_name => "reports/catalogue_out.tt", query => $input, type => "intranet", - authnotrequired => 0, flagsrequired => { reports => 'execute_reports' }, - debug => 1, } ); @@ -104,7 +100,6 @@ sub calculate { } $strsth2 .= " GROUP BY $column ORDER BY $column "; # needed for count push @loopfilter, { crit => 'SQL', sql => 1, filter => $strsth2 }; - $debug and warn "catalogue_out SQL: " . $strsth2; my $sth2 = $dbh->prepare($strsth2); $sth2->execute; @@ -153,9 +148,7 @@ sub calculate { } $query .= " ORDER BY items.itemcallnumber DESC, barcode"; $query .= " LIMIT 0,$limit" if ($limit); - $debug and warn "SQL : $query"; - # warn "SQL : $query"; push @loopfilter, { crit => 'SQL', sql => 1, filter => $query }; my $dbcalc = $dbh->prepare($query); @@ -187,12 +180,6 @@ sub calculate { my (@temptable); my $i = 0; foreach my $cell ( @{ $tables{$tablename} } ) { - if ( 0 == $i++ and $debug ) { - my $dump = Dumper($cell); - $dump =~ s/\n/ /gs; - $dump =~ s/\s+/ /gs; - print STDERR "first cell for $tablename: $dump"; - } push @temptable, $cell; } my $count = scalar(@temptable);