From f8206ca60cb1bbd32a90b7898a6877166026b8bb Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 5 Nov 2020 06:48:04 -0500 Subject: [PATCH] Bug 26594: (QA follow-up) Make _UpdateBorrowerDebarmentFlags a public method Signed-off-by: Jonathan Druart --- Koha/Patron.pm | 2 +- Koha/Patron/Debarments.pm | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Koha/Patron.pm b/Koha/Patron.pm index af3c874dd3..64e8fac486 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -633,7 +633,7 @@ sub merge_with { $results->{merged}->{ $patron_id }->{updated}->{$r} = $rs->count(); $rs->update({ $field => $self->id }); if ( $r eq 'BorrowerDebarment' ) { - Koha::Patron::Debarments::_UpdateBorrowerDebarmentFlags($self->id); + Koha::Patron::Debarments::UpdateBorrowerDebarmentFlags($self->id); } } diff --git a/Koha/Patron/Debarments.pm b/Koha/Patron/Debarments.pm index 9fc2724b55..856c93d740 100644 --- a/Koha/Patron/Debarments.pm +++ b/Koha/Patron/Debarments.pm @@ -98,7 +98,7 @@ sub AddDebarment { my $r = C4::Context->dbh->do( $sql, {}, ( $borrowernumber, $expiration, $type, $comment, $manager_id ) ); - _UpdateBorrowerDebarmentFlags($borrowernumber); + UpdateBorrowerDebarmentFlags($borrowernumber); return $r; } @@ -120,7 +120,7 @@ sub DelDebarment { my $r = C4::Context->dbh->do( $sql, {}, ($id) ); - _UpdateBorrowerDebarmentFlags($borrowernumber); + UpdateBorrowerDebarmentFlags($borrowernumber); return $r; } @@ -163,7 +163,7 @@ sub ModDebarment { my $r = C4::Context->dbh->do( $sql, {}, ( @values, $borrower_debarment_id ) ); - _UpdateBorrowerDebarmentFlags( _GetBorrowernumberByDebarmentId($borrower_debarment_id) ); + UpdateBorrowerDebarmentFlags( _GetBorrowernumberByDebarmentId($borrower_debarment_id) ); return $r; } @@ -211,7 +211,7 @@ sub AddUniqueDebarment { $r = AddDebarment($params); } - _UpdateBorrowerDebarmentFlags($borrowernumber); + UpdateBorrowerDebarmentFlags($borrowernumber); return $r; } @@ -245,9 +245,9 @@ sub DelUniqueDebarment { return DelDebarment( $debarment->{'borrower_debarment_id'} ); } -=head2 _UpdateBorrowerDebarmentFlags +=head2 UpdateBorrowerDebarmentFlags -my $success = _UpdateBorrowerDebarmentFlags( $borrowernumber ); +my $success = UpdateBorrowerDebarmentFlags( $borrowernumber ); So as not to create additional latency, the fields borrowers.debarred and borrowers.debarredcomment remain in the borrowers table. Whenever @@ -257,7 +257,7 @@ in the borrowers table accordingly. =cut -sub _UpdateBorrowerDebarmentFlags { +sub UpdateBorrowerDebarmentFlags { my ($borrowernumber) = @_; return unless ($borrowernumber); -- 2.39.5