[Koha-patches] [PATCH] Bug 5864: link biblio => serials subscription is wrong

Nicole C. Engard nengard at bywatersolutions.com
Tue Mar 15 06:50:07 CET 2011


From: Julian Maurice <julian.maurice at biblibre.com>

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: Nicole C. Engard <nengard at bywatersolutions.com>
---
 .../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 97b642f..123e71c 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 @@
     <!-- TMPL_IF NAME="holdsview" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_IF NAME="object" --><!-- TMPL_VAR NAME="object" --><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="biblionumber" --><!-- /TMPL_IF -->">Holds</a></li>
     <!-- /TMPL_IF -->
 
-    <!-- TMPL_IF name="subscriptionsnumber" --><li><a href="/cgi-bin/koha/serials/serials-home.pl?searched=1&amp;title_filter=<!-- TMPL_VAR NAME="subscriptiontitle" -->">Subscription(s)</a></li><!-- /TMPL_IF -->
+    <!-- TMPL_IF name="subscriptionsnumber" --><li><a href="/cgi-bin/koha/serials/serials-home.pl?searched=1&amp;biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Subscription(s)</a></li><!-- /TMPL_IF -->
 </ul>
 <ul>
 <!-- TMPL_IF NAME="issuehistoryview" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF -->
diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl
index e022497..baf48c1 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 93edc15..00f0fe1 100755
--- a/opac/opac-detail.pl
+++ b/opac/opac-detail.pl
@@ -101,7 +101,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;
-- 
1.7.2.3



More information about the Koha-patches mailing list