[Koha-patches] [PATCH] (bug #3734) Fix previous patch of isbd view

Nahuel ANGELINETTI nahuel.angelinetti at biblibre.com
Thu Nov 12 16:09:46 CET 2009


This patch fix the last patch which delete a line that mustn't be deleted.
---
 C4/Biblio.pm |   23 ++++++++++-------------
 1 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/C4/Biblio.pm b/C4/Biblio.pm
index 8cb7a38..b7143a4 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
-- 
1.6.3.3




More information about the Koha-patches mailing list