[Koha-cvs] koha ISBDdetail.pl opac/opac-ISBDdetail.pl [rel_2_2]

Henri-Damien LAURENT laurenthdl at alinto.com
Thu Apr 12 15:05:13 CEST 2007


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_2_2
Changes by:	Henri-Damien LAURENT <hdl>	07/04/12 13:05:13

Modified files:
	.              : ISBDdetail.pl 
	opac           : opac-ISBDdetail.pl 

Log message:
	Adding finer ISBD parsing to allow subfield values to contain {}.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/ISBDdetail.pl?cvsroot=koha&only_with_tag=rel_2_2&r1=1.4.2.7&r2=1.4.2.8
http://cvs.savannah.gnu.org/viewcvs/koha/opac/opac-ISBDdetail.pl?cvsroot=koha&only_with_tag=rel_2_2&r1=1.5.2.10&r2=1.5.2.11

Patches:
Index: ISBDdetail.pl
===================================================================
RCS file: /sources/koha/koha/Attic/ISBDdetail.pl,v
retrieving revision 1.4.2.7
retrieving revision 1.4.2.8
diff -u -b -r1.4.2.7 -r1.4.2.8
--- ISBDdetail.pl	31 Oct 2006 14:33:32 -0000	1.4.2.7
+++ ISBDdetail.pl	12 Apr 2007 13:05:13 -0000	1.4.2.8
@@ -105,6 +105,7 @@
 						my $tagsubf = $tag.$subfieldcode;
 						$calculated =~ s/\{(.?.?.?.?)$tagsubf(.*?)\}/$1$subfieldvalue\{$1$tagsubf$2\}$2/g;
 					}
+					$calculated=~s/\{(.?.?.?.?)$tag.(.*?)\}//g;
 					# field builded, store the result
 					if ($calculated && !$hasputtextbefore) { # put textbefore if not done
 						$blocres .=$textbefore;
@@ -122,7 +123,7 @@
 	}
 	$res.=$blocres;
 # }
-$res =~ s/\{(.*?)\}//g;
+# $res =~ s/\{(.*?)\}//g;
 $res =~ s/\\n/\n/g;
 $res =~ s/\n/<br\/>/g;
 # remove empty ()

Index: opac/opac-ISBDdetail.pl
===================================================================
RCS file: /sources/koha/koha/opac/opac-ISBDdetail.pl,v
retrieving revision 1.5.2.10
retrieving revision 1.5.2.11
diff -u -b -r1.5.2.10 -r1.5.2.11
--- opac/opac-ISBDdetail.pl	8 Mar 2006 13:46:55 -0000	1.5.2.10
+++ opac/opac-ISBDdetail.pl	12 Apr 2007 13:05:13 -0000	1.5.2.11
@@ -132,6 +132,7 @@
 						my $tagsubf = $tag.$subfieldcode;
 						$calculated =~ s/\{(.?.?.?.?)$tagsubf(.*?)\}/$1$subfieldvalue$2\{$1$tagsubf$2\}/g;
 					}
+                                        $calculated=~s/\{(.?.?.?.?)$tag.(.*?)\}//g;
 					# field builded, store the result
 					if ($calculated && !$hasputtextbefore) { # put textbefore if not done
 						$blocres .=$textbefore;
@@ -149,7 +150,7 @@
 	}
 	$res.=$blocres;
 # }
-$res =~ s/\{(.*?)\}//g;
+# $res =~ s/\{(.*?)\}//g;
 $res =~ s/\\n/\n/g;
 $res =~ s/\n/<br\/>/g;
 # remove empty ()





More information about the Koha-cvs mailing list