Bugzilla – Attachment 5996 Details for
Bug 7060
All instances of GetMemberDetails are unnecessary in C4::Circulation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 7060: GetMemberDetails unnecessary in C4::Circulation
SIGNED-OFF-Bug-7060-GetMemberDetails-unnecessary-i.patch (text/plain), 4.06 KB, created by
Nicole C. Engard
on 2011-10-19 19:48:40 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 7060: GetMemberDetails unnecessary in C4::Circulation
Filename:
MIME Type:
Creator:
Nicole C. Engard
Created:
2011-10-19 19:48:40 UTC
Size:
4.06 KB
patch
obsolete
>From 5439e16c347d4f1dda42a11a7b552418e56e2e3f Mon Sep 17 00:00:00 2001 >From: Ian Walls <ian.walls@bywatersolutions.com> >Date: Tue, 18 Oct 2011 19:55:22 -0400 >Subject: [PATCH] [SIGNED-OFF] Bug 7060: GetMemberDetails unnecessary in C4::Circulation > >Replaces all instances of GetMemberDetails with the more efficient GetMember. Since >no hash values other than the borrowers table's fields are used in this module, the >transition is safe. > >To test: > >1. Checkout a material; the page should load without error >2. Renew a material: the page should load without error >3. Return a material: the page should load without error > >The above test plan invokes all the subroutines affected by this patch; any call to an undefined >value in a hashref should give a warning > >Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> >--- > C4/Circulation.pm | 14 +++++++------- > 1 files changed, 7 insertions(+), 7 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index be62584..c43385a 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -578,7 +578,7 @@ C<$issuingimpossible> and C<$needsconfirmation> are some hashref. > > =over 4 > >-=item C<$borrower> hash with borrower informations (from GetMemberDetails) >+=item C<$borrower> hash with borrower informations (from GetMember or GetMemberDetails) > > =item C<$barcode> is the bar code of the book being issued. > >@@ -858,7 +858,7 @@ sub CanBookBeIssued { > elsif ($issue->{borrowernumber}) { > > # issued to someone else >- my $currborinfo = C4::Members::GetMemberDetails( $issue->{borrowernumber} ); >+ my $currborinfo = C4::Members::GetMember( borrowernumber => $issue->{borrowernumber} ); > > # warn "=>.$currborinfo->{'firstname'} $currborinfo->{'surname'} ($currborinfo->{'cardnumber'})"; > $needsconfirmation{ISSUED_TO_ANOTHER} = 1; >@@ -872,7 +872,7 @@ sub CanBookBeIssued { > my ( $restype, $res ) = C4::Reserves::CheckReserves( $item->{'itemnumber'} ); > if ($restype) { > my $resbor = $res->{'borrowernumber'}; >- my ( $resborrower ) = C4::Members::GetMemberDetails( $resbor, 0 ); >+ my ( $resborrower ) = C4::Members::GetMember( borrowernumber => $resbor ); > my $branches = GetBranches(); > my $branchname = $branches->{ $res->{'branchcode'} }->{'branchname'}; > if ( $resbor ne $borrower->{'borrowernumber'} && $restype eq "Waiting" ) >@@ -909,7 +909,7 @@ Issue a book. Does no check, they are done in CanBookBeIssued. If we reach this > > =over 4 > >-=item C<$borrower> is a hash with borrower informations (from GetMemberDetails). >+=item C<$borrower> is a hash with borrower informations (from GetMember or GetMemberDetails). > > =item C<$barcode> is the barcode of the item being issued. > >@@ -1525,7 +1525,7 @@ sub AddReturn { > my $issue = GetItemIssue($itemnumber); > # warn Dumper($iteminformation); > if ($issue and $issue->{borrowernumber}) { >- $borrower = C4::Members::GetMemberDetails($issue->{borrowernumber}) >+ $borrower = C4::Members::GetMember( borrowernumber => $issue->{borrowernumber}) > or die "Data inconsistency: barcode $barcode (itemnumber:$itemnumber) claims to be issued to non-existant borrowernumber '$issue->{borrowernumber}'\n" > . Dumper($issue) . "\n"; > } else { >@@ -2261,7 +2261,7 @@ sub AddRenewal { > # based on the value of the RenewalPeriodBase syspref. > unless ($datedue) { > >- my $borrower = C4::Members::GetMemberDetails( $borrowernumber, 0 ) or return undef; >+ my $borrower = C4::Members::GetMember( borrowernumber => $borrowernumber ) or return undef; > my $itemtype = (C4::Context->preference('item-level_itypes')) ? $biblio->{'itype'} : $biblio->{'itemtype'}; > > $datedue = (C4::Context->preference('RenewalPeriodBase') eq 'date_due') ? >@@ -2315,7 +2315,7 @@ sub GetRenewCount { > my $renewsallowed = 0; > my $renewsleft = 0; > >- my $borrower = C4::Members::GetMemberDetails($bornum); >+ my $borrower = C4::Members::GetMember( borrowernumber => $bornum); > my $item = GetItem($itemno); > > # Look in the issues table for this item, lent to this borrower, >-- >1.7.2.3
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 7060
:
5969
| 5996 |
6017