X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=opac%2Fopac-shelves.pl;h=b29ade648c580a5b46094f1272283b743e75c063;hb=ef0b0f13fcba4605f99386d4c2bdd87e82234493;hp=065f517b9e5b59f0d2dfe5aa266fe65eb47a19a5;hpb=bb1e9c500c810402c64436c53bcc00ffb9a0b857;p=koha.git diff --git a/opac/opac-shelves.pl b/opac/opac-shelves.pl index 065f517b9e..b29ade648c 100755 --- a/opac/opac-shelves.pl +++ b/opac/opac-shelves.pl @@ -28,6 +28,8 @@ use C4::Members; use C4::Output; use C4::Tags qw( get_tags ); use C4::XSLT; + +use Koha::Biblioitems; use Koha::Virtualshelves; use Koha::RecordProcessor; @@ -258,7 +260,7 @@ if ( $op eq 'view' ) { my $record_processor = Koha::RecordProcessor->new({ filters => 'ViewPolicy' }); my @items; while ( my $content = $contents->next ) { - my $biblionumber = $content->biblionumber->biblionumber; + my $biblionumber = $content->biblionumber; my $this_item = GetBiblioData($biblionumber); my $record = GetMarcBiblio($biblionumber); my $framework = GetFrameworkCode( $biblionumber ); @@ -274,7 +276,8 @@ if ( $op eq 'view' ) { } my $marcflavour = C4::Context->preference("marcflavour"); - my $itemtypeinfo = getitemtypeinfo( $content->biblionumber->biblioitems->first->itemtype, 'opac' ); + my $itemtype = Koha::Biblioitems->search({ biblionumber => $content->biblionumber })->next->itemtype; + my $itemtypeinfo = getitemtypeinfo( $itemtype, 'opac' ); $this_item->{imageurl} = $itemtypeinfo->{imageurl}; $this_item->{description} = $itemtypeinfo->{description}; $this_item->{notforloan} = $itemtypeinfo->{notforloan};