X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=opac%2Fopac-detail.pl;h=4260ca5ef282669d2732c3ffe7ec568a1412f47c;hb=4d90c13eeae579accdcef2aaa221ba14a913de36;hp=3e4c76ca336f938b23bf772f57b7907d0a274c54;hpb=9bb2554e39c583fb994a9d6bb487a75fc7c7251e;p=srvgit diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 3e4c76ca33..4260ca5ef2 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -85,7 +85,7 @@ if (C4::Context->preference("OPACXSLTDetailsDisplay") ) { $template->param('OPACShowCheckoutName' => C4::Context->preference("OPACShowCheckoutName") ); # change back when ive fixed request.pl -my @all_items = &GetItemsInfo( $biblionumber, 'opac' ); +my @all_items = GetItemsInfo( $biblionumber ); my @items; # Getting items to be hidden @@ -295,6 +295,12 @@ $template->param( ocoins => GetCOinSBiblio($biblionumber), ); +my $libravatar_enabled = 0; +eval 'use Libravatar::URL'; +if (!$@ and C4::Context->preference('ShowReviewer')) { + $libravatar_enabled = 1; +} + my $reviews = getreviews( $biblionumber, 1 ); my $loggedincommenter; foreach ( @$reviews ) { @@ -303,6 +309,9 @@ foreach ( @$reviews ) { $_->{title} = $borrowerData->{'title'}; $_->{surname} = $borrowerData->{'surname'}; $_->{firstname} = $borrowerData->{'firstname'}; + if ($libravatar_enabled and $borrowerData->{'email'}) { + $_->{avatarurl} = libravatar_url(email => $borrowerData->{'email'}, https => $ENV{HTTPS}); + } $_->{userid} = $borrowerData->{'userid'}; $_->{cardnumber} = $borrowerData->{'cardnumber'}; $_->{datereviewed} = format_date($_->{datereviewed}); @@ -562,6 +571,7 @@ if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){ $dat->{title} ? $search_for_title =~ s/{TITLE}/$dat->{title}/g : $search_for_title =~ s/{TITLE}//g; $isbn ? $search_for_title =~ s/{ISBN}/$isbn/g : $search_for_title =~ s/{ISBN}//g; $marccontrolnumber ? $search_for_title =~ s/{CONTROLNUMBER}/$marccontrolnumber/g : $search_for_title =~ s/{CONTROLNUMBER}//g; + $search_for_title =~ s/{BIBLIONUMBER}/$biblionumber/g; $template->param('OPACSearchForTitleIn' => $search_for_title); }