Bug 21503: Changed logic for checking values

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Christopher Brannon 2018-10-17 21:19:43 +00:00 committed by Martin Renvoize
parent 99831b25e1
commit 1e90641cd6
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 11 additions and 7 deletions

View File

@ -81,13 +81,17 @@ sub GetDescriptionByKohaField {
authorised_value => $params->{authorised_value},
}
);
return %$av
? $params->{opac}
? $av->{opac_description}
: $av->{lib}
: $params->{authorised_value}
? $params->{authorised_value}
: ''
my $av_check = $params->{authorised_value};
if ($params->{opac}) {
if ($av->{opac_description}) {
$av_check = $av->{opac_description}
} elsif ($av->{lib}) {
$av_check = $av->{lib}
}
} elsif ($av->{lib}) {
$av_check = $av->{lib}
}
return $av_check
}
1;