X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=opac%2Fopac-detail.pl;h=6f10c6bde380cf62da420964863177e45f66f7fe;hb=cc3bc2920744e35256b45b784c9788a64fe6dd04;hp=088039aa560bad0d3ea9761ce30c93a03293f02a;hpb=6d1525dbf1f0783ef90274b1e925e125bededb37;p=koha.git diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 088039aa56..6f10c6bde3 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -173,7 +173,6 @@ if ( $xslfile ) { } my $OpacBrowseResults = C4::Context->preference("OpacBrowseResults"); -$template->{VARS}->{'OpacBrowseResults'} = $OpacBrowseResults; # We look for the busc param to build the simple paging from the search if ($OpacBrowseResults) { @@ -200,6 +199,7 @@ if ($session->param('busc')) { } } else { for my $value (@{$arrParamsBusc->{$_}}) { + next if !defined($value); $pasarParams .= '&' if ($j); $pasarParams .= $_ . '=' . Encode::decode('UTF-8', uri_escape_utf8($value)); $j++; @@ -459,6 +459,7 @@ if ($session->param('busc')) { } $template->param('listResults' => \@listResults) if (@listResults); $template->param('indexPag' => 1 + $offset, 'totalPag' => $arrParamsBusc{'total'}, 'indexPagEnd' => scalar(@arrBiblios) + $offset); + $template->param( 'offset' => $offset ); } } @@ -588,10 +589,9 @@ foreach my $subscription (@subscriptions) { $cell{latestserials} = GetLatestSerials( $subscription->{subscriptionid}, $serials_to_display ); if ( $borrowernumber ) { - my $sub = getalert($borrowernumber,'issue',$subscription->{subscriptionid}); - if (@$sub[0]) { - $cell{hasalert} = 1; - } + my $subscription_object = Koha::Subscriptions->find( $subscription->{subscriptionid} ); + my $subscriber = $subscription_object->subscribers->find( $borrowernumber ); + $cell{hasalert} = 1 if $subscriber; } push @subs, \%cell; } @@ -756,6 +756,14 @@ if (!C4::Context->preference("OPACXSLTDetailsDisplay") ) { my $marcnotesarray = GetMarcNotes ($record,$marcflavour); my $subtitle = GetRecordValue('subtitle', $record, GetFrameworkCode($biblionumber)); +if( C4::Context->preference('ArticleRequests') ) { + my $patron = $borrowernumber ? Koha::Patrons->find($borrowernumber) : undef; + my $artreqpossible = $patron + ? $biblio->can_article_request( $patron ) + : Koha::ItemTypes->find($biblio->itemtype)->may_article_request; + $template->param( artreqpossible => $artreqpossible ); +} + $template->param( MARCNOTES => $marcnotesarray, norequests => $norequests, @@ -1081,7 +1089,7 @@ if (C4::Context->preference("BakerTaylorEnabled")) { { $template->param( BakerTaylorContentURL => - sprintf("http://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=%s&Password=%s&ItemKey=%s&Options=Y", + sprintf("https://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=%s&Password=%s&ItemKey=%s&Options=Y", $bt_user,$bt_pass,$isbn) ); }