Bugzilla – Attachment 73170 Details for
Bug 18816
Make CataloguingLog work in production by preventing circulation from spamming the log
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18816 [QA Followup]: Add rarely used params to hashref, remove param
Bug-18816-QA-Followup-Add-rarely-used-params-to-ha.patch (text/plain), 2.77 KB, created by
Kyle M Hall (khall)
on 2018-03-23 11:05:54 UTC
(
hide
)
Description:
Bug 18816 [QA Followup]: Add rarely used params to hashref, remove param
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2018-03-23 11:05:54 UTC
Size:
2.77 KB
patch
obsolete
>From a7ab91ce628e58bb38debfd147bb8d0c18c9ebb6 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatetsolutions.com> >Date: Fri, 23 Mar 2018 07:04:57 -0400 >Subject: [PATCH] Bug 18816 [QA Followup]: Add rarely used params to hashref, > remove param > >--- > C4/Items.pm | 31 +++++++++++++++++++------------ > 1 file changed, 19 insertions(+), 12 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 5de34a535c..ecbae49954 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -497,7 +497,6 @@ sub ModItemFromMarc { > my $biblionumber = shift; > my $itemnumber = shift; > >- my $dbh = C4::Context->dbh; > my $frameworkcode = C4::Biblio::GetFrameworkCode($biblionumber); > my ( $itemtag, $itemsubfield ) = C4::Biblio::GetMarcFromKohaField( "items.itemnumber", $frameworkcode ); > >@@ -511,13 +510,22 @@ sub ModItemFromMarc { > } > my $unlinked_item_subfields = _get_unlinked_item_subfields( $localitemmarc, $frameworkcode ); > >- ModItem($item, $biblionumber, $itemnumber, $dbh, $frameworkcode, $unlinked_item_subfields); >+ ModItem($item, $biblionumber, $itemnumber, { frameworkcode => $frameworkcode, unlinked_item_subfields => $unlinked_item_subfields } ); > return $item; > } > > =head2 ModItem > >- ModItem({ column => $newvalue }, $biblionumber, $itemnumber, $log_action ); >+ModItem( >+ { column => $newvalue }, >+ $biblionumber, >+ $itemnumber, >+ [$frameworkcode,], >+ { >+ [ log_action => 1, ] >+ [ unlinked_item_subfields => $unlinked_item_subfields, ] >+ } >+); > > Change one or more columns in an item record and update > the MARC representation of the item. >@@ -544,24 +552,23 @@ If log_action is true or undefined, the action will be logged. > =cut > > sub ModItem { >- my $item = shift; >- my $biblionumber = shift; >- my $itemnumber = shift; >+ my $item = shift; >+ my $biblionumber = shift; >+ my $itemnumber = shift; > my $additional_params = shift; > >+ my $dbh = C4::Context->dbh; >+ > my $log_action = $additional_params->{log_action} // 1; >+ my $unlinked_item_subfields = $additional_params->{unlinked_item_subfields}; >+ my $frameworkcode = $additional_params->{frameworkcode} || C4::Biblio::GetFrameworkCode($biblionumber); > > # if $biblionumber is undefined, get it from the current item > unless (defined $biblionumber) { > $biblionumber = _get_single_item_column('biblionumber', $itemnumber); > } > >- my $dbh = @_ ? shift : C4::Context->dbh; >- my $frameworkcode = @_ ? shift : C4::Biblio::GetFrameworkCode( $biblionumber ); >- >- my $unlinked_item_subfields; >- if (@_) { >- $unlinked_item_subfields = shift; >+ if ($unlinked_item_subfields) { > $item->{'more_subfields_xml'} = _get_unlinked_subfields_xml($unlinked_item_subfields); > }; > >-- >2.14.3 (Apple Git-98)
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 18816
:
64383
|
64393
|
65711
|
65712
|
68600
|
68647
|
73154
|
73155
|
73169
|
73170
|
73171
|
73729
|
73730
|
73731
|
73732
|
73733