[Koha-cvs] CVS: koha/C4 Biblio.pm,1.51,1.52
Paul POULAIN
tipaul at users.sourceforge.net
Thu Jul 10 12:37:21 CEST 2003
Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1:/tmp/cvs-serv22206/C4
Modified Files:
Biblio.pm
Log Message:
fix for copyrightdate problem, #514
Index: Biblio.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Biblio.pm,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -r1.51 -r1.52
*** Biblio.pm 2 Jul 2003 14:47:17 -0000 1.51
--- Biblio.pm 10 Jul 2003 10:37:19 -0000 1.52
***************
*** 2,5 ****
--- 2,8 ----
# $Id$
# $Log$
+ # Revision 1.52 2003/07/10 10:37:19 tipaul
+ # fix for copyrightdate problem, #514
+ #
# Revision 1.51 2003/07/02 14:47:17 tipaul
# fix for #519 : items.dateaccessioned imports incorrectly
***************
*** 1096,1099 ****
--- 1099,1111 ----
# additional authors : specific
$result = &MARCmarc2kohaOneField($sth,"additionalauthors","additionalauthors",$record,$result);
+ # modify copyrightdate to keep only the 1st year found
+ my $temp = $result->{'copyrightdate'};
+ $temp =~ m/c(\d\d\d\d)/; # search cYYYY first
+ if ($1>0) {
+ $result->{'copyrightdate'} = $1;
+ } else { # if no cYYYY, get the 1st date.
+ $x =~ m/(\d\d\d\d)/;
+ $result->{'copyrightdate'} = $1;
+ }
return $result;
}
More information about the Koha-cvs
mailing list