From 226a10232a6c43e1bbbaaa3f0ce7a4066eda9e48 Mon Sep 17 00:00:00 2001 From: Jesse Weaver Date: Mon, 14 Sep 2015 16:22:12 -0600 Subject: [PATCH] Bug 14607: (QA followup) Fix one missing occurence, incorrect calls to GetNormalizedUPC Signed-off-by: Alexis Rodegerdts Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 9 +++++---- opac/opac-readingrecord.pl | 2 +- opac/opac-user.pl | 4 +++- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt index 5dfae6d0ad..1a200e6fc8 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -177,7 +177,7 @@ [% IF ( bt_id ) %] See Baker & Taylor [% ELSE %] - No cover image available + No cover image available [% END %] [% END %] @@ -417,10 +417,11 @@ [% END %] [% IF ( BakerTaylorEnabled ) %] - [% IF ( OVERDUE.normalized_isbn ) %] - See Baker & Taylor + [% bt_id = ( OVERDUE.normalized_upc || OVERDUE.normalized_isbn ) %] + [% IF ( bt_id ) %] + See Baker & Taylor [% ELSE %] - No cover image available + No cover image available [% END %] [% END %] diff --git a/opac/opac-readingrecord.pl b/opac/opac-readingrecord.pl index d2fcd47c56..df03b30f3d 100755 --- a/opac/opac-readingrecord.pl +++ b/opac/opac-readingrecord.pl @@ -97,7 +97,7 @@ foreach my $issue ( @{$issues} ) { C4::Context->preference('marcflavour') ); $issue->{subtitle} = GetRecordValue( 'subtitle', $marc_rec, $issue->{frameworkcode} ); - $issue->{normalized_upc} = GetNormalizedUPC( $marc_rec, $issue->{frameworkcode} ); + $issue->{normalized_upc} = GetNormalizedUPC( $marc_rec, C4::Context->preference('marcflavour') ); } # My Summary HTML if ($opac_summary_html) { diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 0a020532d3..71347e4353 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -183,7 +183,8 @@ if ($issues){ } } $issue->{'charges'} = $charges; - $issue->{'subtitle'} = GetRecordValue('subtitle', GetMarcBiblio($issue->{'biblionumber'}), GetFrameworkCode($issue->{'biblionumber'})); + my $marcrecord = GetMarcBiblio( $issue->{'biblionumber'} ); + $issue->{'subtitle'} = GetRecordValue('subtitle', $marcrecord, GetFrameworkCode($issue->{'biblionumber'})); # check if item is renewable my ($status,$renewerror) = CanBookBeRenewed( $borrowernumber, $issue->{'itemnumber'} ); ($issue->{'renewcount'},$issue->{'renewsallowed'},$issue->{'renewsleft'}) = GetRenewCount($borrowernumber, $issue->{'itemnumber'}); @@ -229,6 +230,7 @@ if ($issues){ my $isbn = GetNormalizedISBN($issue->{'isbn'}); $issue->{normalized_isbn} = $isbn; + $issue->{normalized_upc} = GetNormalizedUPC( $marcrecord, C4::Context->preference('marcflavour') ); # My Summary HTML if (my $my_summary_html = C4::Context->preference('OPACMySummaryHTML')){ -- 2.39.5