From fa26bcc037ab7d3dcca8d754418d9490154a4c2f Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Wed, 24 Oct 2007 14:42:10 -0500 Subject: [PATCH] rebuild_unimarc_100 : better handling of unusual cases If 100$a repeated, the scripts failed to handle that correctly Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- misc/migration_tools/22_to_30/rebuild_unimarc_100.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/migration_tools/22_to_30/rebuild_unimarc_100.pl b/misc/migration_tools/22_to_30/rebuild_unimarc_100.pl index 61c961a8c9..e428d6107a 100755 --- a/misc/migration_tools/22_to_30/rebuild_unimarc_100.pl +++ b/misc/migration_tools/22_to_30/rebuild_unimarc_100.pl @@ -21,9 +21,9 @@ $|=1; # flushes output print "Creating/updating field 100 if needed\n"; while (my ($biblionumber,$time)=$sth->fetchrow ){ # my $record; -print "record : $biblionumber \n"; +# print "record : $biblionumber \n"; my $record = GetMarcBiblio($biblionumber); -print "=> ".$record->as_formatted; +# print "=> ".$record->as_formatted; MARCmodrecord($biblionumber,$record,$time); # } @@ -35,7 +35,7 @@ sub MARCmodrecord { $record->leader(' nac 22 1u 4500'); $update=1; my $string; - if ($record->subfield(100,"a")) { + if ($record->field(100)) { $string = substr($record->subfield(100,"a")." ",0,35); my $f100 = $record->field(100); $record->delete_field($f100); -- 2.39.5