[Koha-patches] [PATCH] Bug 6294 Followup: Add {BIBLIONUMBER} parsing on opac-MARCdetail and opac-ISBDdetail

Ian Walls ian.walls at bywatersolutions.com
Fri May 20 15:27:09 CEST 2011


Adds the support the the {BIBLIONUMBER} token to the MARC and ISBD views in the OPAC, as well,
since that code section is not currently centralized.

Signed-off-by: Ian Walls <ian.walls at bywatersolutions.com>
---
 opac/opac-ISBDdetail.pl |    1 +
 opac/opac-MARCdetail.pl |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl
index b50947d..5a791c7 100755
--- a/opac/opac-ISBDdetail.pl
+++ b/opac/opac-ISBDdetail.pl
@@ -163,6 +163,7 @@ if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){
     $dat->{title} =~ s/\s+$//; # remove trailing space
     $dat->{title} ? $search_for_title =~ s/{TITLE}/$dat->{title}/g : $search_for_title =~ s/{TITLE}//g;
     $isbn ? $search_for_title =~ s/{ISBN}/$isbn/g : $search_for_title =~ s/{ISBN}//g;
+    $search_for_title =~ s/{BIBLIONUMBER}/$biblionumber/g;
  $template->param('OPACSearchForTitleIn' => $search_for_title);
 }
 
diff --git a/opac/opac-MARCdetail.pl b/opac/opac-MARCdetail.pl
index 8e492aa..2940406 100755
--- a/opac/opac-MARCdetail.pl
+++ b/opac/opac-MARCdetail.pl
@@ -277,6 +277,7 @@ if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){
     $biblio->{title} =~ s/\s+$//; # remove trailing space
     $biblio->{title} ? $search_for_title =~ s/{TITLE}/$biblio->{title}/g : $search_for_title =~ s/{TITLE}//g;
     $biblio->{isbn} ? $search_for_title =~ s/{ISBN}/$biblio->{isbn}/g : $search_for_title =~ s/{ISBN}//g;
+    $search_for_title =~ s/{BIBLIONUMBER}/$biblionumber/g;
  $template->param('OPACSearchForTitleIn' => $search_for_title);
 }
 
-- 
1.5.6.5



More information about the Koha-patches mailing list