Bugzilla – Attachment 87928 Details for
Bug 22700
Make biblio_metadata prefetchable from Koha::Biblio
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22700: Make biblio_metadata prefetchable from Koha::Biblio
Bug-22700-Make-bibliometadata-prefetchable-from-Ko.patch (text/plain), 1.02 KB, created by
Tomás Cohen Arazi
on 2019-04-12 16:47:35 UTC
(
hide
)
Description:
Bug 22700: Make biblio_metadata prefetchable from Koha::Biblio
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi
Created:
2019-04-12 16:47:35 UTC
Size:
1.02 KB
patch
obsolete
>From 497511d654a999b550e4d6b45038630eb79bac51 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 12 Apr 2019 13:46:04 -0300 >Subject: [PATCH] Bug 22700: Make biblio_metadata prefetchable from > Koha::Biblio > >This patch makes $biblio->metadata be prefetchable as the Coding >guidelines require. > >To test: >- Apply this patch >- Run: > $ kshell > k$ prove t/db_dependent/Koha/Biblio.t >=> SUCCESS: No regressions! >- Sign off :-D >--- > Koha/Biblio.pm | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > >diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm >index 56f91859d5..f4e8adeb71 100644 >--- a/Koha/Biblio.pm >+++ b/Koha/Biblio.pm >@@ -74,9 +74,8 @@ Returns a Koha::Biblio::Metadata object > sub metadata { > my ( $self ) = @_; > >- $self->{_metadata} ||= Koha::Biblio::Metadatas->find( { biblionumber => $self->id } ); >- >- return $self->{_metadata}; >+ my $metadata_rs = $self->_result->biblio_metadatas; >+ return Koha::Biblio::Metadata->_new_from_dbic($metadata_rs->next); > } > > =head3 subtitles >-- >2.21.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 22700
:
87928
|
87931
|
87943
|
88355
|
88492