From b324e893e86730378f633db0537eb0048c6b8a35 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 16 Apr 2014 15:28:38 +0000 Subject: [PATCH] Bug 11630: (follow-up) tighten up code This patch tightens up the initialization of the $restriction_age variable and uses $bibvalues throughout. Signed-off-by: Galen Charlton --- C4/Circulation.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 91a5814de5..f4fe5784ba 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -977,9 +977,7 @@ sub CanBookBeIssued { # get $marker from preferences. Could be something like "FSK|PEGI|Alter|Age:" my $markers = C4::Context->preference('AgeRestrictionMarker'); my $bibvalues = $biblioitem->{'agerestriction'}; - my $restriction_age = 0; - - $restriction_age = GetAgeRestriction( $biblioitem->{'agerestriction'} ); + my $restriction_age = GetAgeRestriction( $bibvalues ); if ( $restriction_age > 0 ) { if ( $borrower->{'dateofbirth'} ) { -- 2.20.1