[Koha-patches] [PATCH] (bug #3726) fix ISBD url translation
Nahuel ANGELINETTI
nahuel.angelinetti at biblibre.com
Thu Oct 22 12:26:34 CEST 2009
---
C4/Biblio.pm | 6 +++---
catalogue/ISBDdetail.pl | 2 +-
opac/opac-ISBDdetail.pl | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/C4/Biblio.pm b/C4/Biblio.pm
index c7645e2..5e5825e 100755
--- a/C4/Biblio.pm
+++ b/C4/Biblio.pm
@@ -742,7 +742,7 @@ Return the ISBD view which can be included in opac and intranet
=cut
sub GetISBDView {
- my $biblionumber = shift;
+ my ($biblionumber, $template) = @_;
my $record = GetMarcBiblio($biblionumber);
my $itemtype = &GetFrameworkCode($biblionumber);
my ($holdingbrtagf,$holdingbrtagsubf) = &GetMarcFromKohaField("items.holdingbranch",$itemtype);
@@ -786,7 +786,7 @@ sub GetISBDView {
my $tagsubf = $tag . $subfvalue;
$calculated =~
s/\{(.?.?.?.?)$tagsubf(.*?)\}/$1$subfieldvalue$2\{$1$tagsubf$2\}/g;
- $calculated =~s#/cgi-bin/koha/[^/]+/([^.]*.pl\?.*)$#opac-$1#g;
+ $calculated =~s#/cgi-bin/koha/[^/]+/([^.]*.pl\?.*)$#opac-$1#g if ($template eq "opac");
# field builded, store the result
if ( $calculated && !$hasputtextbefore )
@@ -827,7 +827,7 @@ sub GetISBDView {
$calculated =~
s/\{(.?.?.?.?)$tagsubf(.*?)\}/$1$subfieldvalue$2\{$1$tagsubf$2\}/g;
- $calculated =~s#/cgi-bin/koha/[^/]+/([^.]*.pl\?.*)$#opac-$1#g;
+ $calculated =~s#/cgi-bin/koha/[^/]+/([^.]*.pl\?.*)$#opac-$1#g if ($template eq "opac");
}
# field builded, store the result
diff --git a/catalogue/ISBDdetail.pl b/catalogue/ISBDdetail.pl
index b2dea40..7414d73 100755
--- a/catalogue/ISBDdetail.pl
+++ b/catalogue/ISBDdetail.pl
@@ -68,7 +68,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
# my @blocs = split /\@/,$ISBD;
# my @fields = $record->fields();
-my $res = GetISBDView($biblionumber);
+my $res = GetISBDView($biblionumber, "intranet");
# count of item linked with biblio
my $itemcount = GetItemsCount($biblionumber);
diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl
index e2187fe..cbb9877 100755
--- a/opac/opac-ISBDdetail.pl
+++ b/opac/opac-ISBDdetail.pl
@@ -99,7 +99,7 @@ $template->param(
# my @blocs = split /\@/,$ISBD;
# my @fields = $record->fields();
-my $res = GetISBDView($biblionumber);
+my $res = GetISBDView($biblionumber, "opac");
my $reviews = getreviews( $biblionumber, 1 );
foreach ( @$reviews ) {
--
1.6.0.4
More information about the Koha-patches
mailing list