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>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Marcel de Rooy 2016-07-28 10:29:18 +02:00 committed by Kyle M Hall
parent 2b84e18575
commit 82ffd2812c
3 changed files with 3 additions and 3 deletions

View file

@ -3010,7 +3010,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', '' );

View file

@ -246,7 +246,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);
}

View file

@ -111,7 +111,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);
}