Bugzilla – Attachment 102095 Details for
Bug 23247
Use EmbedItems in opac-MARCdetail.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23247: (QA follow-up) Restore embedding items in record
Bug-23247-QA-follow-up-Restore-embedding-items-in-.patch (text/plain), 1.85 KB, created by
Tomás Cohen Arazi (tcohen)
on 2020-03-30 22:21:56 UTC
(
hide
)
Description:
Bug 23247: (QA follow-up) Restore embedding items in record
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2020-03-30 22:21:56 UTC
Size:
1.85 KB
patch
obsolete
>From 159f06d635b681edda1660c4e2aeecf7356f613b Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 30 Mar 2020 19:02:04 -0300 >Subject: [PATCH] Bug 23247: (QA follow-up) Restore embedding items in record > >The original code called GetMarcBiblio with embeditems => 1, and I >overlooked it. > >This patch makes it embed the items. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > opac/opac-MARCdetail.pl | 16 ++++++++++++---- > 1 file changed, 12 insertions(+), 4 deletions(-) > >diff --git a/opac/opac-MARCdetail.pl b/opac/opac-MARCdetail.pl >index c4c300181a..c16da0bb15 100755 >--- a/opac/opac-MARCdetail.pl >+++ b/opac/opac-MARCdetail.pl >@@ -107,11 +107,19 @@ unless ( $patron and $patron->category->override_hidden_items ) { > my $record = $biblio->metadata->record; > my $marcflavour = C4::Context->preference("marcflavour"); > >+my @visible_items = $biblio->items->as_list; >+@visible_items = >+ grep { !$_->hidden_in_opac( { rules => $opachiddenitems_rules } ) } >+ @visible_items >+ unless $patron and $patron->category->override_hidden_items; >+ >+ > my $record_processor = Koha::RecordProcessor->new({ >- filters => 'ViewPolicy', >+ filters => [ 'EmbedItems', 'ViewPolicy' ], > options => { >- interface => 'opac', >- frameworkcode => $biblio->frameworkcode >+ interface => 'opac', >+ frameworkcode => $biblio->frameworkcode, >+ items => \@visible_items > } > }); > $record_processor->process($record); >@@ -305,7 +313,7 @@ foreach my $field (@fields) { > } > else { > $item->{ $subf[$i][0] } .= GetAuthorisedValueDesc( $field->tag(), $subf[$i][0], >- $subf[$i][1], '', $tagslib, '', 'opac' ); >+ $subf[$i][1], '', $tagslib, '', 'opac' ) // ""; > } > > my $kohafield = $tagslib->{ $field->tag() }->{ $subf[$i][0] }->{kohafield}; >-- >2.26.0
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 23247
:
91158
|
91253
|
93528
|
102094
|
102095
|
138059
|
144689
|
146813