Bug 19808: (follow-up) Handle deleted reviewers gracefully - opac-detail

Make the tests easier to read

Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2017-12-18 13:32:02 -03:00
parent 12882d824e
commit 2cd52f68cb

View file

@ -844,16 +844,18 @@ if ( C4::Context->preference('reviewson') ) {
my $patron = Koha::Patrons->find( $review->{borrowernumber} );
# setting some borrower info into this hash
if ( $patron ) {
$review->{patron} = $patron;
if ( $libravatar_enabled and $patron and $patron->email ) {
if ( $libravatar_enabled and $patron->email ) {
$review->{avatarurl} = libravatar_url( email => $patron->email, https => $ENV{HTTPS} );
}
if ( $patron and $patron->borrowernumber eq $borrowernumber ) {
if ( $patron->borrowernumber eq $borrowernumber ) {
$loggedincommenter = 1;
}
}
}
}
if ( C4::Context->preference("OPACISBD") ) {
$template->param( ISBD => 1 );