From ad211435f94def67fa7b04512862e02915e1bcf1 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 4 Oct 2021 11:48:39 +0200 Subject: [PATCH] Bug 28734: Remove unadvertised changes 1. Using $frameworkcode instead of the default '' is an unadvertised change. It would make sense to use $frameworkcode, but actually we must remove this parameter and always use the default, as we decided to make the default authoritative. I would prefer to not introduce this change, just in case.. 2. Remove uneeded C4::Koha:: prefix 3. Restore good import (use plurals) --- C4/XSLT.pm | 14 +++++++------- t/db_dependent/Koha/Biblio.t | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index 532c86e5264..743edf340e8 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -81,7 +81,7 @@ sub transformMARCXML4XSLT { my ( $letter, $value ) = @$subfield; # Replace the field value with the authorised value *except* for MARC21/NORMARC field 942$n (suppression in opac) if ( !( $tag eq '942' && $subfield->[0] eq 'n' ) || $marcflavour eq 'UNIMARC' ) { - $value = GetAuthorisedValueDesc( $tag, $letter, $value, $frameworkcode, $tagslib, undef, $opac ) + $value = GetAuthorisedValueDesc( $tag, $letter, $value, '', $tagslib, undef, $opac ) if $av->{ $tag }->{ $letter }; } push( @new_subfields, $letter, $value ); @@ -394,13 +394,13 @@ sub buildKohaItemsNamespace { else { $status = "available"; } - my $homebranch = C4::Koha::xml_escape($branches{$item->homebranch}); - my $holdingbranch = C4::Koha::xml_escape($branches{$item->holdingbranch}); + my $homebranch = xml_escape($branches{$item->homebranch}); + my $holdingbranch = xml_escape($branches{$item->holdingbranch}); my $resultbranch = C4::Context->preference('OPACResultsLibrary') eq 'homebranch' ? $homebranch : $holdingbranch; - my $location = C4::Koha::xml_escape($item->location && exists $shelflocations->{$item->location} ? $shelflocations->{$item->location} : $item->location); - my $ccode = C4::Koha::xml_escape($item->ccode && exists $ccodes->{$item->ccode} ? $ccodes->{$item->ccode} : $item->ccode); - my $itemcallnumber = C4::Koha::xml_escape($item->itemcallnumber); - my $stocknumber = C4::Koha::xml_escape($item->stocknumber); + my $location = xml_escape($item->location && exists $shelflocations->{$item->location} ? $shelflocations->{$item->location} : $item->location); + my $ccode = xml_escape($item->ccode && exists $ccodes->{$item->ccode} ? $ccodes->{$item->ccode} : $item->ccode); + my $itemcallnumber = xml_escape($item->itemcallnumber); + my $stocknumber = xml_escape($item->stocknumber); $xml .= "" . "$homebranch" diff --git a/t/db_dependent/Koha/Biblio.t b/t/db_dependent/Koha/Biblio.t index f67ba269d5b..d4c9e56e815 100755 --- a/t/db_dependent/Koha/Biblio.t +++ b/t/db_dependent/Koha/Biblio.t @@ -22,8 +22,8 @@ use Test::More tests => 14; use C4::Biblio qw( AddBiblio ModBiblio ); use Koha::Database; use Koha::Acquisition::Orders; -use Koha::AuthorisedValueCategory; -use Koha::AuthorisedValue; +use Koha::AuthorisedValueCategories; +use Koha::AuthorisedValues; use Koha::MarcSubfieldStructures; use t::lib::TestBuilder; -- 2.25.1