Bugzilla – Attachment 152144 Details for
Bug 33950
Unnecessary processing in opac-readingrec if BakerTaylor and Syndetics off
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33950: Don't get marcxml if not necessary - opac-readingrecord.pl
Bug-33950-Dont-get-marcxml-if-not-necessary---opac.patch (text/plain), 2.22 KB, created by
Nick Clemens (kidclamp)
on 2023-06-08 10:44:33 UTC
(
hide
)
Description:
Bug 33950: Don't get marcxml if not necessary - opac-readingrecord.pl
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-06-08 10:44:33 UTC
Size:
2.22 KB
patch
obsolete
>From 9f8e74cf4a211cc53ee6d3c930368dcd2ebbd975 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 8 Jun 2023 10:14:33 +0200 >Subject: [PATCH] Bug 33950: Don't get marcxml if not necessary - > opac-readingrecord.pl > >We are retrieving normalized_upc from the MARC XML in the controller (opac-readingrec.pl) >for all issues to display, but this is only used if BakerTaylor or Syndetics are enabled. > >Test plan: >Have some checkouts and confirm that the checkout history is displayed >the same before and after this patch. >You should also test BakerTaylor or Syndetics and see if they are >working correctly, but I have no idea how to test them! > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > opac/opac-readingrecord.pl | 20 +++++++++++++------- > 1 file changed, 13 insertions(+), 7 deletions(-) > >diff --git a/opac/opac-readingrecord.pl b/opac/opac-readingrecord.pl >index 55981483e9..a968ed7761 100755 >--- a/opac/opac-readingrecord.pl >+++ b/opac/opac-readingrecord.pl >@@ -89,13 +89,19 @@ foreach my $issue ( @{$issues} ) { > getitemtypeimagelocation( 'opac', > $itemtypes->{ $issue->{$itype_attribute} }->{imageurl} ); > } >- my $marcxml = C4::Biblio::GetXmlBiblio( $issue->{biblionumber} ); >- if ( $marcxml ) { >- $marcxml = StripNonXmlChars( $marcxml ); >- my $marc_rec = >- MARC::Record::new_from_xml( $marcxml, 'UTF-8', >- C4::Context->preference('marcflavour') ); >- $issue->{normalized_upc} = GetNormalizedUPC( $marc_rec, C4::Context->preference('marcflavour') ); >+ >+ if ( C4::Context->preference('BakerTaylorEnabled') >+ || C4::Context->preference('SyndeticsEnabled') >+ || C4::Context->preference('SyndeticsCoverImages') ) >+ { >+ my $marcxml = C4::Biblio::GetXmlBiblio( $issue->{biblionumber} ); >+ if ( $marcxml ) { >+ $marcxml = StripNonXmlChars( $marcxml ); >+ my $marc_rec = >+ MARC::Record::new_from_xml( $marcxml, 'UTF-8', >+ C4::Context->preference('marcflavour') ); >+ $issue->{normalized_upc} = GetNormalizedUPC( $marc_rec, C4::Context->preference('marcflavour') ); >+ } > } > # My Summary HTML > if ($opac_summary_html) { >-- >2.30.2
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 33950
:
152140
| 152144