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 <gmc@esilibrary.com>
This commit is contained in:
Galen Charlton 2014-04-16 15:28:38 +00:00
parent 25451ce624
commit b324e893e8
1 changed files with 1 additions and 3 deletions

View File

@ -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'} ) {