From 1c6b52cf331c7a5eeb24966e99a051d7a35a5d79 Mon Sep 17 00:00:00 2001 From: kados Date: Tue, 11 Jul 2006 17:58:23 +0000 Subject: [PATCH] fix for 1106: MARC 21 008 record editor plugin deletes first six 008 positions --- value_builder/marc21_field_008.pl | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/value_builder/marc21_field_008.pl b/value_builder/marc21_field_008.pl index e68f5234be..529dd840b0 100644 --- a/value_builder/marc21_field_008.pl +++ b/value_builder/marc21_field_008.pl @@ -37,7 +37,6 @@ my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); $year +=1900; $mon +=1; my $dateentered = substr($year,2,2).sprintf ("%0.2d", $mon).sprintf ("%0.2d",$mday); - sub plugin_parameters { my ($dbh,$record,$tagslib,$i,$tabloop) = @_; return ""; @@ -73,7 +72,6 @@ function Clic$function_name(i) { return ($function_name,$res); } - sub plugin { my ($input) = @_; my %env; @@ -114,13 +112,11 @@ sub plugin { my $f38 = substr($result,38,1); my $f39 = substr($result,39,1); - if (!$f1){ - $f1=$dateentered - } +if ((!$f1) ||($f1 =~ m/ /)){ + $f1=$dateentered; +} - $template->param( - - index => $index, + $template->param( index => $index, f1 => $f1, f6 => $f6, "f6$f6" => $f6, @@ -131,21 +127,21 @@ sub plugin { f22 => $f22, "f22$f22" => $f22, f23 => $f23, - "f23$f23" => $f23, + "f23$f23" => $f23, f2427 => $f2427, "f24$f2427" => $f2427, f28 => $f28, - "f28$f28" => $f28, + "f28$f28" => $f28, f29 => $f29, - "f29$f29" => $f29, + "f29$f29" => $f29, f30 => $f30, - "f230$f30" => $f30, + "f230$f30" => $f30, f31 => $f31, - "f31$f31" => $f31, + "f31$f31" => $f31, f33 => $f33, - "f33$f33" => $f33, + "f33$f33" => $f33, f34 => $f34, - "f34$f34" => $f34, + "f34$f34" => $f34, f3537 => $f3537, f38 => $f38, "f38$f38" => $f38, -- 2.39.5