From 003e3c75f9bfff4d6be956ea5465035e799e69a6 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Fri, 18 Mar 2011 10:15:08 +0000 Subject: [PATCH] Bug 5864: link biblio => serials subscription is wrong The GetSubscription function can be called with 3 parameters : title, issn, biblionumber. In biblio view (both opac & staff interface), the link to jump from the biblio to the subscription(s) was done using title. The result was that for a title like "Science", all subscriptions containing "science" in the title were linked. That's too much and that's false. This commit fixes this problem by calling GetSubscription with biblionumber only where applicable. Signed-off-by: Magnus Enger Signed-off-by: Chris Cormack (cherry picked from commit 632277e453fa80797e1cfc9dc32f1d1d8cc089af) Signed-off-by: Chris Nighswonger --- koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc | 2 +- opac/opac-ISBDdetail.pl | 4 ++-- opac/opac-detail.pl | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc index 97b642f7f0..123e71c7e3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc @@ -24,7 +24,7 @@
  • ">Holds
  • -
  • ">Subscription(s)
  • +
  • ">Subscription(s)
    • diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl index d3ffecc9a9..52737db5ee 100755 --- a/opac/opac-ISBDdetail.pl +++ b/opac/opac-ISBDdetail.pl @@ -97,8 +97,8 @@ $template->param( my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber); my $dbh = C4::Context->dbh; my $dat = TransformMarcToKoha( $dbh, $record ); -my @subscriptions = - GetSubscriptions( $dat->{title}, $dat->{issn}, $biblionumber ); +my @subscriptions = GetSubscriptions( undef, undef, $biblionumber ); + my @subs; foreach my $subscription (@subscriptions) { my %cell; diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 2ca23de3fd..37206c534d 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -100,7 +100,7 @@ my $collections = GetKohaAuthorisedValues('items.ccode',$dat->{'frameworkcode'} #coping with subscriptions my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber); -my @subscriptions = GetSubscriptions( $dat->{title}, $dat->{issn}, $biblionumber ); +my @subscriptions = GetSubscriptions( undef, undef, $biblionumber ); my @subs; $dat->{'serial'}=1 if $subscriptionsnumber; -- 2.39.5