From b159ba8e5aba27572394658867624f3573a0574b Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Sun, 23 Aug 2009 11:26:35 -0400 Subject: [PATCH] fix how patron_flagged gets set for opac-user.tmpl Remove unneeded variable and get value from $borr->{'flagged'} directly, avoiding glitch where $borr->{'flagged'} could be set after old $patron_flagged variable was set. Signed-off-by: Galen Charlton --- opac/opac-user.pl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/opac/opac-user.pl b/opac/opac-user.pl index c411c07b0c..8247f96640 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -66,8 +66,7 @@ $borr->{'ethnicity'} = fixEthnicity( $borr->{'ethnicity'} ); if ( $borr->{'debarred'} || $borr->{'gonenoaddress'} || $borr->{'lost'} ) { $borr->{'flagged'} = 1; } -# $make flagged available everywhere in the template -my $patron_flagged = $borr->{'flagged'}; + if ( $borr->{'amountoutstanding'} > 5 ) { $borr->{'amountoverfive'} = 1; } @@ -94,7 +93,7 @@ $bordat[0] = $borr; $template->param( BORROWER_INFO => \@bordat, borrowernumber => $borrowernumber, - patron_flagged => $patron_flagged, + patron_flagged => $borr->{flagged}, ); #get issued items .... -- 2.39.5