From 65fd1cf419241d1850ed72cdc2a4868e739064e1 Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Thu, 22 Oct 2009 12:26:12 +0200 Subject: [PATCH] (bug #3726) fix ISBD url translation --- 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 c7645e27fe..5e5825e6a7 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 b2dea4041b..7414d73e8d 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 e2187fe750..cbb9877e9f 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 ) { -- 2.20.1