X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=C4%2FXSLT.pm;h=06dfaf4a7b5a32837559b21e23460269909da49e;hb=62621825e5f12c203a10c59464e5f5ed6cc3c0a6;hp=d22a3ace8e253b69528db37303fd6b74caefd0fa;hpb=0b0212cae3497f7746eb58a5397453c6e0173ba0;p=koha_gimpoz diff --git a/C4/XSLT.pm b/C4/XSLT.pm old mode 100755 new mode 100644 index d22a3ace8e..06dfaf4a7b --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -121,12 +121,12 @@ sub getAuthorisedValues4MARCSubfields { my $stylesheet; sub XSLTParse4Display { - my ( $biblionumber, $orig_record, $xsl_suffix, $interface, $fixamps ) = @_; + my ( $biblionumber, $orig_record, $xsl_suffix, $interface, $fixamps, $hidden_items ) = @_; $interface = 'opac' unless $interface; # grab the XML, run it through our stylesheet, push it out to the browser my $record = transformMARCXML4XSLT($biblionumber, $orig_record); #return $record->as_formatted(); - my $itemsxml = buildKohaItemsNamespace($biblionumber); + my $itemsxml = buildKohaItemsNamespace($biblionumber, $hidden_items); my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour')); my $sysxml = "\n"; foreach my $syspref ( qw/ hidelostitems OPACURLOpenInNewWindow @@ -180,8 +180,13 @@ sub XSLTParse4Display { } sub buildKohaItemsNamespace { - my ($biblionumber) = @_; + my ($biblionumber, $hidden_items) = @_; + my @items = C4::Items::GetItemsInfo($biblionumber); + if ($hidden_items && @$hidden_items) { + my %hi = map {$_ => 1} @$hidden_items; + @items = grep { !$hi{$_->{itemnumber}} } @items; + } my $branches = GetBranches(); my $itemtypes = GetItemTypes(); my $xml = '';