X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=basket%2Fbasket.pl;h=83440fd66eb3b642c8c4cb43954250efd5931b32;hb=a6c9bd0eb55c32d5632625144775271f20aa15f7;hp=8fc15e4b73862865cc07644bd84e34dfac2c6cb8;hpb=aef1dd15fbe37a8a9c30ba4b38f7ecd6c1fea54d;p=srvgit diff --git a/basket/basket.pl b/basket/basket.pl index 8fc15e4b73..83440fd66e 100755 --- a/basket/basket.pl +++ b/basket/basket.pl @@ -18,18 +18,19 @@ use strict; use warnings; -use CGI; +use CGI qw ( -utf8 ); use C4::Koha; use C4::Biblio; use C4::Items; use C4::Auth; use C4::Output; +use C4::Csv; my $query = new CGI; my ( $template, $borrowernumber, $cookie ) = get_template_and_user ( { - template_name => "basket/basket.tmpl", + template_name => "basket/basket.tt", query => $query, type => "intranet", flagsrequired => { borrow => 1 }, @@ -60,6 +61,7 @@ foreach my $biblionumber ( @bibs ) { $template->param( biblionumber => $biblionumber ); my $dat = &GetBiblioData($biblionumber); + next unless $dat; my $record = &GetMarcBiblio($biblionumber); my $marcnotesarray = GetMarcNotes( $record, $marcflavour ); my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour ); @@ -73,8 +75,8 @@ foreach my $biblionumber ( @bibs ) { $hasauthors = 1; } - my $shelflocations =GetKohaAuthorisedValues('items.location',$dat->{'frameworkcode'}, 'opac'); - my $collections = GetKohaAuthorisedValues('items.ccode',$dat->{'frameworkcode'}, 'opac'); + my $shelflocations =GetKohaAuthorisedValues('items.location',$dat->{'frameworkcode'}); + my $collections = GetKohaAuthorisedValues('items.ccode',$dat->{'frameworkcode'}); for my $itm (@items) { if ($itm->{'location'}){ @@ -120,6 +122,8 @@ my $resultsarray = \@results; $template->param( BIBLIO_RESULTS => $resultsarray, + csv_profiles => GetCsvProfilesLoop('marc'), + bib_list => $bib_list, ); output_html_with_http_headers $query, $cookie, $template->output;