Bugzilla – Attachment 21082 Details for
Bug 10876
Fix opac-MARCdetail.pl partial hides
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix opac-MARCdetail.pl partial hides
0003-Bug-10876-Fix-opac-MARCdetail.pl-partial-hides.patch (text/plain), 1.62 KB, created by
Mark Tompsett
on 2013-09-13 12:01:10 UTC
(
hide
)
Description:
Fix opac-MARCdetail.pl partial hides
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2013-09-13 12:01:10 UTC
Size:
1.62 KB
patch
obsolete
>From b98da6cecd438abebc6430c446f3a180842751d8 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Fri, 13 Sep 2013 06:47:15 -0400 >Subject: [PATCH 3/3] Bug 10876 - Fix opac-MARCdetail.pl partial hides > >When OpacHiddenItems is used to hide some, but not all of the >items for a biblio, then the opac-MARCdetail page displayed >all the items, rather than just the ones intended to be visible. > >By determining the tag and subtag for items.itemnumber, the >loop which builds the big array can be filtered to exclude >records that should be hidden. >--- > opac/opac-MARCdetail.pl | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/opac/opac-MARCdetail.pl b/opac/opac-MARCdetail.pl >index 705a182..305afed 100755 >--- a/opac/opac-MARCdetail.pl >+++ b/opac/opac-MARCdetail.pl >@@ -53,6 +53,7 @@ use C4::Biblio; > use C4::Items; > use C4::Acquisition; > use C4::Koha; >+use List::MoreUtils qw/any/; > > my $query = new CGI; > >@@ -77,6 +78,7 @@ if (scalar @all_items >= 1) { > > my $itemtype = &GetFrameworkCode($biblionumber); > my $tagslib = &GetMarcStructure( 0, $itemtype ); >+my ($tag_itemnumber,$subtag_itemnumber) = &GetMarcFromKohaField('items.itemnumber',$itemtype); > my $biblio = GetBiblioData($biblionumber); > $biblionumber = $biblio->{biblionumber}; > my $record = GetMarcBiblio($biblionumber, 1); >@@ -238,6 +240,9 @@ my %witness > my @big_array; > foreach my $field (@fields) { > next if ( $field->tag() < 10 ); >+ next if ( ( $field->tag() eq $tag_itemnumber) && >+ (any { $field->subfield($subtag_itemnumber) eq $_ } >+ @items2hide) ); > my @subf = $field->subfields; > my %this_row; > >-- >1.7.9.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10876
:
20985
|
21079
|
21082
|
21122
|
21135