[Koha-patches] [PATCH 2/2] fix how patron_flagged gets set for opac-user.tmpl
Galen Charlton
gmcharlt at gmail.com
Sun Aug 23 17:33:30 CEST 2009
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 <gmcharlt at gmail.com>
---
opac/opac-user.pl | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/opac/opac-user.pl b/opac/opac-user.pl
index c411c07..8247f96 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 ....
--
1.6.3.3
More information about the Koha-patches
mailing list