[Koha-cvs] CVS: koha/reports reservereport.pl,1.1,1.2
Chris Cormack
rangi at users.sourceforge.net
Fri Aug 26 01:17:28 CEST 2005
Update of /cvsroot/koha/koha/reports
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8109
Modified Files:
reservereport.pl
Log Message:
Fixed reserve report script
Index: reservereport.pl
===================================================================
RCS file: /cvsroot/koha/koha/reports/reservereport.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** reservereport.pl 25 Aug 2005 22:29:30 -0000 1.1
--- reservereport.pl 25 Aug 2005 23:17:26 -0000 1.2
***************
*** 4,8 ****
#script to display reports
-
# Copyright 2000-2002 Katipo Communications
#
--- 4,7 ----
***************
*** 28,55 ****
use C4::Output;
use HTML::Template;
! my $input=new CGI;
! my $time=$input->param('time');
! #print $input->header;
! #print startpage;
! #print startmenu('report');
! my $template = gettemplate("reservereport.tmpl");
! #print center;
! #print mktablehdr();
! my ($count,$data)=unfilledreserves();
my @dataloop;
! for (my $i=0;$i<$count;$i++){
! my %line;
! $line{name}="$data->[$i]->{'surname'}\, $data->[$i]->{'firstname'}";
! $line{'reservedate'}=$data->[$i]->{'reservedate'};
! $line{'title'}=$data->[$i]->{'title'};
! $line{'classification'}="$data->[$i]->{'classification'}$data->[$i]->{'dewey'}";
! push(@dataloop,\%line);
}
! $template->param( count => $count,
! dataloop => \@dataloop);
! print "Content-Type: text/html\n\n", $template->output;
--- 27,65 ----
use C4::Output;
use HTML::Template;
+ use C4::Auth;
+ use C4::Interface::CGI::Output;
+ my $input = new CGI;
+ my $time = $input->param('time');
! my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
! {
! template_name => "reports/reservereport.tmpl",
! query => $input,
! type => "intranet",
! authnotrequired => 0,
! flagsrequired => { editcatalogue => 1 },
! debug => 1,
! }
! );
! my ( $count, $data ) = unfilledreserves();
my @dataloop;
! for ( my $i = 0 ; $i < $count ; $i++ ) {
! warn "here";
! my %line;
! $line{name} = "$data->[$i]->{'surname'}\, $data->[$i]->{'firstname'}";
! $line{'reservedate'} = $data->[$i]->{'reservedate'};
! $line{'title'} = $data->[$i]->{'title'};
! $line{'classification'} =
! "$data->[$i]->{'classification'}$data->[$i]->{'dewey'}";
! push( @dataloop, \%line );
}
! $template->param(
! count => $count,
! dataloop => \@dataloop
! );
!
! output_html_with_http_headers $input, $cookie, $template->output;
More information about the Koha-cvs
mailing list