From f1796cc5bde10a324561a093fcdb3780d9b15536 Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Thu, 12 Nov 2009 16:08:47 +0100 Subject: [PATCH] (bug #3734) Fix previous patch of isbd view This patch fix the last patch which delete a line that mustn't be deleted. --- C4/Biblio.pm | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index e5471b257d..6599c332e4 100755 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -816,19 +816,16 @@ sub GetISBDView { else { my @subf = $field->subfields; for my $i ( 0 .. $#subf ) { - my $valuecode = $subf[$i][1]; - my $subfieldcode = $subf[$i][0]; - my $subfieldvalue = - GetAuthorisedValueDesc( $tag, $subf[$i][0], - $subf[$i][1], '', $tagslib ); - my $tagsubf = $tag . $subfieldcode; - - $calculated =~ s/ # replace all {{}} codes by the value code. - \{\{$tagsubf\}\} # catch the {{actualcode}} - / - $valuecode # replace by the value code - /gx; - + my $valuecode = $subf[$i][1]; + my $subfieldcode = $subf[$i][0]; + my $subfieldvalue = + GetAuthorisedValueDesc( $tag, $subf[$i][0], + $subf[$i][1], '', $tagslib ); + my $tagsubf = $tag . $subfieldcode; + + $calculated =~ s/\{\{$tagsubf\}\}/$valuecode/gx; + $calculated =~ + s/\{(.?.?.?.?)$tagsubf(.*?)\}/$1$subfieldvalue$2\{$1$tagsubf$2\}/g; } # field builded, store the result -- 2.39.5