Bugzilla – Attachment 123121 Details for
Bug 28750
Undefined subroutines in svc/cataloguing/framework (caused by bug 17600)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28750: (bug 17600 follow-up) Use full routine names in svc/new_bib svc/bib
Bug-28750-bug-17600-follow-up-Use-full-routine-nam.patch (text/plain), 4.31 KB, created by
Nick Clemens (kidclamp)
on 2021-07-23 14:24:10 UTC
(
hide
)
Description:
Bug 28750: (bug 17600 follow-up) Use full routine names in svc/new_bib svc/bib
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2021-07-23 14:24:10 UTC
Size:
4.31 KB
patch
obsolete
>From 9243cdb8aaf12681b8044bf27341437bb7209754 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 23 Jul 2021 14:16:06 +0000 >Subject: [PATCH] Bug 28750: (bug 17600 follow-up) Use full routine names in > svc/new_bib svc/bib > >To test: >1 - Attempt to save a record in the advanced cataloging editor >2 - It fails >3 - Apply patch >4 - It succeeds >--- > svc/bib | 14 +++++++------- > svc/new_bib | 8 ++++---- > 2 files changed, 11 insertions(+), 11 deletions(-) > >diff --git a/svc/bib b/svc/bib >index 43fc6f6857..5d412dc7de 100755 >--- a/svc/bib >+++ b/svc/bib >@@ -65,7 +65,7 @@ exit 0; > sub fetch_bib { > my $query = shift; > my $biblionumber = shift; >- my $record = GetMarcBiblio({ >+ my $record = C4::Biblio::GetMarcBiblio({ > biblionumber => $biblionumber, > embed_items => scalar $query->param('items') }); > if (defined $record) { >@@ -79,7 +79,7 @@ sub fetch_bib { > sub update_bib { > my $query = shift; > my $biblionumber = shift; >- my $old_record = GetMarcBiblio({ biblionumber => $biblionumber }); >+ my $old_record = C4::Biblio::GetMarcBiblio({ biblionumber => $biblionumber }); > my $frameworkcode = $query->url_param('frameworkcode') // GetFrameworkCode($biblionumber); > unless (defined $old_record) { > print $query->header(-type => 'text/xml', -status => '404 Not Found'); >@@ -98,7 +98,7 @@ sub update_bib { > } else { > my $fullrecord = $record->clone(); > my ( $itemtag, $itemsubfield ) = >- GetMarcFromKohaField( "items.itemnumber" ); >+ C4::Biblio::GetMarcFromKohaField( "items.itemnumber" ); > > # delete any item tags > foreach my $field ( $record->field($itemtag) ) { >@@ -109,13 +109,13 @@ sub update_bib { > foreach my $field ( $fullrecord->field($itemtag) ) { > my $one_item_record = $record->clone(); > $one_item_record->add_fields($field); >- ModItemFromMarc( $one_item_record, $biblionumber, >+ C4::Items::ModItemFromMarc( $one_item_record, $biblionumber, > $field->subfield($itemsubfield) ); > } > } > >- ModBiblio( $record, $biblionumber, $frameworkcode ); >- my $new_record = GetMarcBiblio({ >+ C4::Biblio::ModBiblio( $record, $biblionumber, $frameworkcode ); >+ my $new_record = C4::Biblio::GetMarcBiblio({ > biblionumber => $biblionumber, > embed_items => scalar $query->url_param('items') }); > >@@ -133,7 +133,7 @@ sub update_bib { > sub delete_bib { > my $query = shift; > my $biblionumber = shift; >- my $error = DelBiblio($biblionumber); >+ my $error = C4::Biblio::DelBiblio($biblionumber); > > if (defined $error) { > print $query->header(-type => 'text/xml', -status => '400 Bad request'); >diff --git a/svc/new_bib b/svc/new_bib >index 0aa04fc6cf..2d277ed1d7 100755 >--- a/svc/new_bib >+++ b/svc/new_bib >@@ -63,19 +63,19 @@ sub add_bib { > # fix character set > if ($record->encoding() eq 'MARC-8') { > my ($guessed_charset, $charset_errors); >- ($record, $guessed_charset, $charset_errors) = MarcToUTF8Record($record, $marcflavour); >+ ($record, $guessed_charset, $charset_errors) = C4::Charset::MarcToUTF8Record($record, $marcflavour); > } > > my $fullrecord = $record->clone(); > > # delete any item tags > my ( $itemtag, $itemsubfield ) = >- GetMarcFromKohaField( "items.itemnumber" ); >+ C4::Biblio::GetMarcFromKohaField( "items.itemnumber" ); > foreach my $field ( $record->field($itemtag) ) { > $record->delete_field($field); > } > my ( $biblionumber, $biblioitemnumber ) = AddBiblio( $record, $frameworkcode ); >- my $new_record = GetMarcBiblio({ biblionumber => $biblionumber }); >+ my $new_record = C4::Biblio::GetMarcBiblio({ biblionumber => $biblionumber }); > if ( $query->url_param('items') ) { > foreach my $field ( $fullrecord->field($itemtag) ) { > my $one_item_record = $new_record->clone(); >@@ -84,7 +84,7 @@ sub add_bib { > } > } > >- $new_record = GetMarcBiblio({ >+ $new_record = C4::Biblio::GetMarcBiblio({ > biblionumber => $biblionumber, > embed_items => scalar $query->url_param('items') }); > $result->{'status'} = "ok"; >-- >2.20.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 28750
:
123118
|
123121
|
123124
|
123144
|
123154
|
123155
|
123156