From 632277e453fa80797e1cfc9dc32f1d1d8cc089af 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 --- 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 6e4d276690..b50947ddab 100755 --- a/opac/opac-ISBDdetail.pl +++ b/opac/opac-ISBDdetail.pl @@ -98,8 +98,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 6dc983fcd7..1015e543da 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -102,7 +102,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