From b5ddc813a281b62e98efda801f1b6a7115e6c2ee Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 20 May 2014 10:09:08 -0700 Subject: [PATCH] LP#1296937: move the $force_bc parameter of ->charged_items() to an implementation method Argubably, the $force_bc parameter of OpenILS::SIP::Patron->charged_items() method exists solely as an implementation convenience for the renew-all code. Consequently, this patch removes the $force_bc parameter from the public interface for charged_items() and spins it off into a new implementation method. This patch should be applied at the same time that a reversion of SIPServer commit c97d64412bc is applied. Note that a user who upgrades SIPServer without upgrading Evergreen to a version that contains this patch will end up in a situation where the code that counts active loans for the patron information response will fetch the loans using $force_bc set to true; this works only by coincidence. Signed-off-by: Galen Charlton Signed-off-by: Jeff Godin --- Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm | 9 ++++++++- .../src/perlmods/lib/OpenILS/SIP/Transaction/RenewAll.pm | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm b/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm index 7e998f8152..69232f14e3 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm @@ -739,8 +739,15 @@ sub __circ_to_title { $e->retrieve_asset_copy($circ->target_copy) ); } -# force_bc -- return barcode data regardless of msg64_summary_datatype sub charged_items { + my ($self, $start, $end, $ids_only) = shift; + return $self->charged_items_impl($start, $end, undef, $ids_only); +} + +# implementation method +# force_bc -- return barcode data regardless of msg64_summary_datatype; +# this is used by the renew-all code +sub charged_items_impl { my ($self, $start, $end, $force_bc, $ids_only) = shift; $self->__patron_items_info(); diff --git a/Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction/RenewAll.pm b/Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction/RenewAll.pm index 675d6adee3..ed762a9a48 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction/RenewAll.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction/RenewAll.pm @@ -31,7 +31,7 @@ sub do_renew_all { my $self = shift; my $sip = shift; - my $barcodes = $self->patron->charged_items(undef, undef, 1); + my $barcodes = $self->patron->charged_items_impl(undef, undef, 1); syslog('LOG_INFO', "OILS: RenewalAll for user ". $self->patron->{id} ." and items [@$barcodes]"); -- 2.43.2