Bugzilla – Attachment 142141 Details for
Bug 31224
Koha::Biblio::Metadata->record should use the EmbedItems filter
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31224: Support 'interface' on metadata_record
Bug-31224-Support-interface-on-metadatarecord.patch (text/plain), 2.04 KB, created by
Martin Renvoize (ashimema)
on 2022-10-19 09:20:46 UTC
(
hide
)
Description:
Bug 31224: Support 'interface' on metadata_record
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-10-19 09:20:46 UTC
Size:
2.04 KB
patch
obsolete
>From afa0800ce6a41bd2b603cb817be0adbd0dcc0da5 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 18 Oct 2022 16:44:39 +0100 >Subject: [PATCH] Bug 31224: Support 'interface' on metadata_record > >We replace the 'opac' boolean with an 'interface' param here to allow >for ViewPolicy filtering depending on 'opac', 'intranet' or 'nothing' >being passed. >--- > Koha/Biblio.pm | 18 ++++++++++-------- > 1 file changed, 10 insertions(+), 8 deletions(-) > >diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm >index 09f774f963..1a9f80f1f2 100644 >--- a/Koha/Biblio.pm >+++ b/Koha/Biblio.pm >@@ -92,10 +92,12 @@ sub metadata { > > my $record = $biblio->metadata_record( > { >- [ embed_items => 1|0, >- opac => 1|0, >- patron => $patron, >- expand_coded_fields => 1|0 ] >+ [ >+ embed_items => 1 | 0, >+ interface => 'opac' | 'intranet', >+ patron => $patron, >+ expand_coded_fields => 1 | 0 >+ ] > } > ); > >@@ -111,18 +113,18 @@ sub metadata_record { > > my $record = $self->metadata->record; > >- if ( $params->{embed_items} or $params->{opac} ) { >+ if ( $params->{embed_items} or $params->{interface} ) { > > # There's need for a RecordProcessor, let's do it! > my @filters; > my $options = { >- interface => 'opac', >+ interface => $params->{interface}, > frameworkcode => $self->frameworkcode, > }; > > if ( $params->{embed_items} ) { > push @filters, 'EmbedItems'; >- if ( $params->{opac} ) { >+ if ( $params->{interface} eq 'opac' ) { > $options->{items} = $self->items->filter_by_visible_in_opac( > { > ( >@@ -136,7 +138,7 @@ sub metadata_record { > } > } > >- if ( $params->{opac} ) { >+ if ( $params->{interface} ) { > push @filters, 'ViewPolicy'; > } > >-- >2.20.1
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 31224
:
138060
|
138061
|
138062
|
138063
|
138064
|
142137
|
142138
|
142139
|
142140
|
142141
|
142142
|
142143
|
161933
|
161934
|
161935
|
161936
|
161937
|
161938
|
161939
|
161940
|
161941
|
161942
|
161943
|
161944
|
173530
|
173531
|
173532
|
173533
|
173534
|
173535
|
173588
|
173597
|
173598
|
173636
|
173637
|
173638
|
173639
|
173640
|
173641
|
173642
|
173643
|
173644
|
174262
|
174263