From c80b328aaeec50a765c6a127e422ac41ceca629a Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 24 Jun 2008 10:21:12 -0500 Subject: [PATCH] clean up old-style calls to GetMemberDetails GetMemberDetails() returns only one hashref now, not two. In all cases where the caller was expecting two output values, the $flags return was ignored anyway. Signed-off-by: Joshua Ferraro --- C4/Auth.pm | 3 +-- C4/Circulation.pm | 7 +++---- C4/Print.pm | 2 +- opac/opac-ics.pl | 2 +- opac/opac-passwd.pl | 2 +- opac/opac-readingrecord.pl | 2 +- opac/opac-reserve.pl | 2 +- opac/opac-user.pl | 2 +- opac/opac-userdetails.pl | 2 +- opac/opac-userupdate.pl | 2 +- opac/sco/sco-main.pl | 6 +++--- 11 files changed, 15 insertions(+), 17 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index f986542d2e..74106c33c3 100755 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -156,8 +156,7 @@ sub get_template_and_user { } $borrowernumber = getborrowernumber($user); - my ( $borr, $alternativeflags ) = - GetMemberDetails( $borrowernumber ); + my ( $borr ) = GetMemberDetails( $borrowernumber ); my @bordat; $bordat[0] = $borr; $template->param( "USER_INFO" => \@bordat ); diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 25a8dcc5f3..826efd5ba7 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -788,7 +788,7 @@ sub CanBookBeIssued { my ( $restype, $res ) = C4::Reserves::CheckReserves( $item->{'itemnumber'} ); if ($restype) { my $resbor = $res->{'borrowernumber'}; - my ( $resborrower, $flags ) = GetMemberDetails( $resbor, 0 ); + my ( $resborrower ) = GetMemberDetails( $resbor, 0 ); my $branches = GetBranches(); my $branchname = $branches->{ $res->{'branchcode'} }->{'branchname'}; if ( $resbor ne $borrower->{'borrowernumber'} && $restype eq "Waiting" ) @@ -910,7 +910,7 @@ sub AddIssue { # warn "Waiting"; # The item is on reserve and waiting, but has been # reserved by some other patron. - my ( $resborrower, $flags ) = GetMemberDetails( $resbor, 0 ); + my ( $resborrower ) = GetMemberDetails( $resbor, 0 ); my $branches = GetBranches(); my $branchname = $branches->{ $res->{'branchcode'} }->{'branchname'}; @@ -919,8 +919,7 @@ sub AddIssue { # warn "Reserved"; # The item is reserved by someone else. - my ( $resborrower, $flags ) = - GetMemberDetails( $resbor, 0 ); + my ( $resborrower ) = GetMemberDetails( $resbor, 0 ); my $branches = GetBranches(); my $branchname = $branches->{ $res->{'branchcode'} }->{'branchname'}; if ($cancelreserve) { # cancel reserves on this item diff --git a/C4/Print.pm b/C4/Print.pm index ab08c9033a..582ecdef96 100644 --- a/C4/Print.pm +++ b/C4/Print.pm @@ -178,7 +178,7 @@ EOF #' sub printslip ($) { my ( $borrowernumber ) = shift; - my ( $borrower, $flags ) = GetMemberDetails( $borrowernumber); + my ( $borrower ) = GetMemberDetails( $borrowernumber); my ($countissues,$issueslist) = GetPendingIssues($borrowernumber); foreach my $it (@$issueslist){ $it->{'date_due'}=format_date($it->{'date_due'}); diff --git a/opac/opac-ics.pl b/opac/opac-ics.pl index 58edfbfc34..ce35edf4e6 100755 --- a/opac/opac-ics.pl +++ b/opac/opac-ics.pl @@ -45,7 +45,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( ); # get borrower information .... -my ( $borr, $flags ) = GetMemberDetails( $borrowernumber ); +my ( $borr ) = GetMemberDetails( $borrowernumber ); # Create Calendar my $calendar = Data::ICal->new(); diff --git a/opac/opac-passwd.pl b/opac/opac-passwd.pl index 465dd00970..a4f27dfcfe 100755 --- a/opac/opac-passwd.pl +++ b/opac/opac-passwd.pl @@ -44,7 +44,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( ); # get borrower information .... -my ( $borr, $flags ) = GetMemberDetails( $borrowernumber ); +my ( $borr ) = GetMemberDetails( $borrowernumber ); my $sth = $dbh->prepare("UPDATE borrowers SET password = ? WHERE borrowernumber=?"); my $minpasslen = C4::Context->preference("minPasswordLength"); if ( $query->param('Oldkey') diff --git a/opac/opac-readingrecord.pl b/opac/opac-readingrecord.pl index 1a6722ab67..7a9abbea3d 100755 --- a/opac/opac-readingrecord.pl +++ b/opac/opac-readingrecord.pl @@ -41,7 +41,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( ); # get borrower information .... -my ( $borr, $flags ) = GetMemberDetails( $borrowernumber ); +my ( $borr ) = GetMemberDetails( $borrowernumber ); $template->param($borr); diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index 88da5d3e3e..30342a13e6 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -51,7 +51,7 @@ sub get_out ($$$) { } # get borrower information .... -my ( $borr, $flags ) = GetMemberDetails( $borrowernumber ); +my ( $borr ) = GetMemberDetails( $borrowernumber ); # get branches and itemtypes my $branches = GetBranches(); diff --git a/opac/opac-user.pl b/opac/opac-user.pl index bbcebf7d84..13ebb1ee66 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -47,7 +47,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( my $patronupdate = $query->param('patronupdate'); # get borrower information .... -my ( $borr, $flags ) = GetMemberDetails( $borrowernumber ); +my ( $borr ) = GetMemberDetails( $borrowernumber ); $borr->{'dateenrolled'} = format_date( $borr->{'dateenrolled'} ); $borr->{'expiry'} = format_date( $borr->{'expiry'} ); diff --git a/opac/opac-userdetails.pl b/opac/opac-userdetails.pl index 3274829938..1760c10d2d 100755 --- a/opac/opac-userdetails.pl +++ b/opac/opac-userdetails.pl @@ -41,7 +41,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( ); # get borrower information .... -my ( $borr, $flags ) = GetMemberDetails( $borrowernumber ); +my ( $borr ) = GetMemberDetails( $borrowernumber ); $borr->{'dateenrolled'} = format_date( $borr->{'dateenrolled'} ); $borr->{'dateexpiry'} = format_date( $borr->{'dateexpiry'} ); diff --git a/opac/opac-userupdate.pl b/opac/opac-userupdate.pl index 83fd4a5244..384f003d83 100755 --- a/opac/opac-userupdate.pl +++ b/opac/opac-userupdate.pl @@ -46,7 +46,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( ); # get borrower information .... -my ( $borr, $flags ) = GetMemberDetails( $borrowernumber ); +my ( $borr ) = GetMemberDetails( $borrowernumber ); my $lib = GetBranchDetail($borr->{'branchcode'}); # handle the new information.... diff --git a/opac/sco/sco-main.pl b/opac/sco/sco-main.pl index cace390aed..434dd00eec 100755 --- a/opac/sco/sco-main.pl +++ b/opac/sco/sco-main.pl @@ -44,10 +44,10 @@ my %confirmation_strings = ( RENEW_ISSUE => "This item is already checked out to my $issuenoconfirm = 1; #don't need to confirm on issue. my $cnt = 0; #warn "issuerid: " . $issuerid; -my ($issuer, $flags) = GetMemberDetails($issuerid); +my ($issuer) = GetMemberDetails($issuerid); my $item = GetItem(undef,$barcode); my $borrower; -($borrower, $flags) = GetMemberDetails(undef,$userid); +($borrower) = GetMemberDetails(undef,$userid); my $branch = $issuer->{branchcode}; my $confirm_required = 0; @@ -60,7 +60,7 @@ if ($op eq "logout") { if ($op eq "returnbook") { my ($doreturn ) = AddReturn($barcode, $branch); #warn "returnbook: " . $doreturn; - ($borrower, $flags) = GetMemberDetails(undef, $userid); + ($borrower) = GetMemberDetails(undef, $userid); } if ($op eq "checkout" ) { -- 2.11.4.GIT