Bugzilla – Attachment 53849 Details for
Bug 16365
Selectively introduce GetMarcStructure() "unsafe" variant for better performance
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16365: Adding additional unsafe call-candidates from Acquisition
Bug-16365-Adding-additional-unsafe-call-candidates.patch (text/plain), 2.48 KB, created by
Jonathan Druart
on 2016-08-01 16:05:46 UTC
(
hide
)
Description:
Bug 16365: Adding additional unsafe call-candidates from Acquisition
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-08-01 16:05:46 UTC
Size:
2.48 KB
patch
obsolete
>From 0fb537295ef4b2557c6348222d603c9e37581af2 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 28 Jul 2016 10:29:18 +0200 >Subject: [PATCH] Bug 16365: Adding additional unsafe call-candidates from > Acquisition > >[1] Candidate 1 is FillWithDefaultValues. >This routine in Acquisition.pm does not autovivify the tagslib >structure but first collects the keys at tag and subfield level. >So, unsafe can be safely added here :) > >[2] Candidate 2 is script acqui/neworderempty.pl. >It only (!) uses GetMarcStructure to know if there is a ACQ framework. >There should be cheaper ways to do it, but when we use the fast cache, >it does not matter that much anymore. > >[3] Candidate 3 is script acqui/orderreceive.pl. Same reason as [2]. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Tested with neworderempty.pl > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > C4/Acquisition.pm | 2 +- > acqui/neworderempty.pl | 2 +- > acqui/orderreceive.pl | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index 6894cb4..a696b7d 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -3001,7 +3001,7 @@ If the field does not exist, it will be created too. > > sub FillWithDefaultValues { > my ($record) = @_; >- my $tagslib = C4::Biblio::GetMarcStructure( 1, 'ACQ' ); >+ my $tagslib = C4::Biblio::GetMarcStructure( 1, 'ACQ', { unsafe => 1 } ); > if ($tagslib) { > my ($itemfield) = > C4::Biblio::GetMarcFromKohaField( 'items.itemnumber', '' ); >diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl >index da5acd5..a4134da 100755 >--- a/acqui/neworderempty.pl >+++ b/acqui/neworderempty.pl >@@ -265,7 +265,7 @@ $template->param( sort2 => $data->{'sort2'} ); > > if (C4::Context->preference('AcqCreateItem') eq 'ordering' && !$ordernumber) { > # Check if ACQ framework exists >- my $marc = GetMarcStructure(1, 'ACQ'); >+ my $marc = GetMarcStructure(1, 'ACQ', { unsafe => 1 } ); > unless($marc) { > $template->param('NoACQframework' => 1); > } >diff --git a/acqui/orderreceive.pl b/acqui/orderreceive.pl >index a75a624..402d566 100755 >--- a/acqui/orderreceive.pl >+++ b/acqui/orderreceive.pl >@@ -112,7 +112,7 @@ unless ( $results and @$results) { > my $order = $results->[0]; > > # Check if ACQ framework exists >-my $acq_fw = GetMarcStructure(1, 'ACQ'); >+my $acq_fw = GetMarcStructure( 1, 'ACQ', { unsafe => 1 } ); > unless($acq_fw) { > $template->param('NoACQframework' => 1); > } >-- >2.8.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 16365
:
50797
|
52409
|
53746
|
53761
|
53762
|
53763
|
53764
|
53847
|
53848
| 53849 |
53850