Bugzilla – Attachment 41971 Details for
Bug 11247
Fix calls of TransformHtmlToXml
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11247: Fix calls of TransformHtmlToXml
Bug-11247-Fix-calls-of-TransformHtmlToXml.patch (text/plain), 4.21 KB, created by
Marcel de Rooy
on 2015-08-26 12:53:26 UTC
(
hide
)
Description:
Bug 11247: Fix calls of TransformHtmlToXml
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2015-08-26 12:53:26 UTC
Size:
4.21 KB
patch
obsolete
>From a80cdecfb0fbd457764cf9a07ef89b0cb68ba9bf Mon Sep 17 00:00:00 2001 >From: Srdjan <srdjan@catalyst.net.nz> >Date: Thu, 14 Nov 2013 19:10:30 +1300 >Subject: [PATCH] Bug 11247: Fix calls of TransformHtmlToXml >Content-Type: text/plain; charset=utf-8 > >The ind_tag of TransformHtmlToXml is unused. >Some calls to this function incorrectly revert indicator and ind_tag (which >is not a problem when both are empty..) > >Patch of Srdjan Jankovic, amended and signed off by Marcel de Rooy. > >The following calls are fixed: >call in acqui/addorder.pl: switched indicator with ind_tag >call in acqui/addorderiso2709.pl replaced too >acqui/finishreceive.pl replaced too > >These calls are fine: >two calls in cataloguing/additem.pl are fine >call in serials/serials-edit.pl is fine >call in tools/batchMod.pl is fine > >The folllow-up patch adds a simple unit test. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >With AcqCreateItem=='placing an order', tested if adding an order still >worked (covered both addorder.pl and addorderiso2709.pl). >--- > C4/Biblio.pm | 2 ++ > acqui/addorder.pl | 2 +- > acqui/addorderiso2709.pl | 2 +- > acqui/finishreceive.pl | 3 ++- > 4 files changed, 6 insertions(+), 3 deletions(-) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index d90094e..0911e0f 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -2317,6 +2317,8 @@ $auth_type contains : > > sub TransformHtmlToXml { > my ( $tags, $subfields, $values, $indicator, $ind_tag, $auth_type ) = @_; >+ # NOTE: The parameter $ind_tag is NOT USED -- BZ 11247 >+ > my $xml = MARC::File::XML::header('UTF-8'); > $xml .= "<record>\n"; > $auth_type = C4::Context->preference('marcflavour') unless $auth_type; >diff --git a/acqui/addorder.pl b/acqui/addorder.pl >index 5a5cd9d..f58e58d 100755 >--- a/acqui/addorder.pl >+++ b/acqui/addorder.pl >@@ -307,8 +307,8 @@ if ( $orderinfo->{quantity} ne '0' ) { > my $xml = TransformHtmlToXml( $itemhash{$item}->{'tags'}, > $itemhash{$item}->{'subfields'}, > $itemhash{$item}->{'field_values'}, >- $itemhash{$item}->{'ind_tag'}, > $itemhash{$item}->{'indicator'}, >+ $itemhash{$item}->{'ind_tag'}, > 'ITEM'); > my $record=MARC::Record::new_from_xml($xml, 'UTF-8'); > my ($biblionumber,$bibitemnum,$itemnumber) = AddItemFromMarc($record,$$orderinfo{biblionumber}); >diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl >index b809fb9..6bb744f 100755 >--- a/acqui/addorderiso2709.pl >+++ b/acqui/addorderiso2709.pl >@@ -279,7 +279,7 @@ if ($op eq ""){ > push @{ $item->{field_values} }, $field_values[0]; > push @{ $item->{ind_tag} }, $ind_tag[0]; > push @{ $item->{indicator} }, $indicator[0]; >- my $xml = TransformHtmlToXml( \@tags, \@subfields, \@field_values, \@ind_tag, \@indicator ); >+ my $xml = TransformHtmlToXml( \@tags, \@subfields, \@field_values, \@indicator, \@ind_tag ); > my $record = MARC::Record::new_from_xml( $xml, 'UTF-8' ); > for (my $qtyloop=1;$qtyloop <= $c_quantity;$qtyloop++) { > my ( $biblionumber, $bibitemnum, $itemnumber ) = AddItemFromMarc( $record, $biblionumber ); >diff --git a/acqui/finishreceive.pl b/acqui/finishreceive.pl >index 5f0cf81..6402a5b 100755 >--- a/acqui/finishreceive.pl >+++ b/acqui/finishreceive.pl >@@ -149,8 +149,9 @@ if ($quantityrec > $origquantityrec ) { > my $xml = TransformHtmlToXml( $itemhash{$item}->{'tags'}, > $itemhash{$item}->{'subfields'}, > $itemhash{$item}->{'field_values'}, >+ $itemhash{$item}->{'indicator'}, > $itemhash{$item}->{'ind_tag'}, >- $itemhash{$item}->{'indicator'},'ITEM'); >+ 'ITEM' ); > my $record=MARC::Record::new_from_xml($xml, 'UTF-8'); > my (undef,$bibitemnum,$itemnumber) = AddItemFromMarc($record,$biblionumber); > $order->add_item( $itemnumber ); >-- >1.7.10.4
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 11247
:
22923
|
22924
|
22953
|
41911
|
41971
|
41972
|
42088
|
42137
|
42138
|
42226