Bugzilla – Attachment 126791 Details for
Bug 29307
marc record fetched twice in detail.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29307: Remove unecessary marc record fetch on detail.pl
Bug-29307-Remove-unecessary-marc-record-fetch-on-d.patch (text/plain), 1.37 KB, created by
David Nind
on 2021-10-23 20:47:22 UTC
(
hide
)
Description:
Bug 29307: Remove unecessary marc record fetch on detail.pl
Filename:
MIME Type:
Creator:
David Nind
Created:
2021-10-23 20:47:22 UTC
Size:
1.37 KB
patch
obsolete
>From 2ea78aeee2d6fd3e6a5be3218d537859506e69fc Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 22 Oct 2021 13:42:34 +0200 >Subject: [PATCH] Bug 29307: Remove unecessary marc record fetch on detail.pl > >We were fetching the MARC::Record twice here. > >Signed-off-by: David Nind <david@davidnind.com> >--- > catalogue/detail.pl | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index b5801cca71..2fb8da28ae 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -83,10 +83,12 @@ if ( C4::Context->config('enable_plugins') ) { > > my $biblionumber = $query->param('biblionumber'); > $biblionumber = HTML::Entities::encode($biblionumber); >-my $record = GetMarcBiblio({ biblionumber => $biblionumber }); > my $biblio = Koha::Biblios->find( $biblionumber ); > $template->param( 'biblio', $biblio ); > >+my $record = eval { $biblio->metadata->record }; >+$template->param( decoding_error => $@ ); >+ > if ( not defined $record ) { > # biblionumber invalid -> report and exit > $template->param( unknownbiblionumber => 1, >@@ -95,8 +97,6 @@ if ( not defined $record ) { > exit; > } > >-eval { $biblio->metadata->record }; >-$template->param( decoding_error => $@ ); > > if($query->cookie("holdfor")){ > my $holdfor_patron = Koha::Patrons->find( $query->cookie("holdfor") ); >-- >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 29307
:
126749
|
126791
|
131864