(bug #3726) fix ISBD url translation

This commit is contained in:
Nahuel ANGELINETTI 2009-10-22 12:26:12 +02:00 committed by Henri-Damien LAURENT
parent f3b0a7aa89
commit 65fd1cf419
3 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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);

View File

@ -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 ) {