Bugzilla – Attachment 128880 Details for
Bug 29764
EmbedItems RecordProcessor filter POD incorrect
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29764: Fix incorrect EmbedItems RecordProcessor filter POD
Bug-29764-Fix-incorrect-EmbedItems-RecordProcessor.patch (text/plain), 1.66 KB, created by
Tomás Cohen Arazi (tcohen)
on 2021-12-23 11:46:35 UTC
(
hide
)
Description:
Bug 29764: Fix incorrect EmbedItems RecordProcessor filter POD
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2021-12-23 11:46:35 UTC
Size:
1.66 KB
patch
obsolete
>From c6632490c6eb06367241ebf9d3222ad33c11e0a3 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 23 Dec 2021 08:41:33 -0300 >Subject: [PATCH] Bug 29764: Fix incorrect EmbedItems RecordProcessor filter > POD > >This patch makes the usage POD for the EmbedItems filter actually be >usable. The filter is used in opac-ISBDdetail.pl and the POD is updated >to how it is used there. > >Not much to test. >--- > Koha/Filter/MARC/EmbedItems.pm | 18 +++++++----------- > 1 file changed, 7 insertions(+), 11 deletions(-) > >diff --git a/Koha/Filter/MARC/EmbedItems.pm b/Koha/Filter/MARC/EmbedItems.pm >index ae8ec34a26..25ee117657 100644 >--- a/Koha/Filter/MARC/EmbedItems.pm >+++ b/Koha/Filter/MARC/EmbedItems.pm >@@ -23,26 +23,22 @@ Koha::Filter::MARC::EmbedItems - Appends item information on MARC::Record object > > =head1 SYNOPSIS > >-my $biblio = Koha::Biblios->find( >- $biblio_id, >- { prefetch => [ items, metadata ] } >-); >- >-my $rules = C4::Context->yaml_preference('OpacHiddenItems'); >+my $patron = Koha::Patrons->find($loggedinuser); > >-my @items = grep { !$_->hidden_in_opac({ rules => $rules }) @{$biblio->items}; > my $record = $biblio->metadata->record; >+my @items = $biblio->items->filter_by_visible_in_opac({ patron => $patron })->as_list; > >-my $processor = Koha::RecordProcessor->new( >+my $record_processor = Koha::RecordProcessor->new( > { >- filters => ('EmbedItems'), >+ filters => ['EmbedItems'], > options => { >- items => \@items >+ interface => 'opac', >+ items => \@items > } > } > ); > >-$processor->process( $record ); >+$record_processor->process($record); > > =head1 DESCRIPTION > >-- >2.32.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 29764
:
128880
|
128881
|
128983
|
129232