[Koha-cvs] CVS: koha/C4 Biblio.pm,1.57,1.58
Paul POULAIN
tipaul at users.sourceforge.net
Wed Aug 6 14:54:54 CEST 2003
Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1:/tmp/cvs-serv13937/C4
Modified Files:
Biblio.pm
Log Message:
fix for publicationyear : extracting numeric value from MARC string, like for copyrightdate.
(note that copyrightdate still extracted to get numeric format)
Index: Biblio.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Biblio.pm,v
retrieving revision 1.57
retrieving revision 1.58
diff -C2 -r1.57 -r1.58
*** Biblio.pm 15 Jul 2003 23:09:18 -0000 1.57
--- Biblio.pm 6 Aug 2003 12:54:52 -0000 1.58
***************
*** 2,5 ****
--- 2,9 ----
# $Id$
# $Log$
+ # Revision 1.58 2003/08/06 12:54:52 tipaul
+ # fix for publicationyear : extracting numeric value from MARC string, like for copyrightdate.
+ # (note that copyrightdate still extracted to get numeric format)
+ #
# Revision 1.57 2003/07/15 23:09:18 slef
# change show columns to use biblioitems bnotes too
***************
*** 1120,1123 ****
--- 1124,1136 ----
$temp =~ m/(\d\d\d\d)/;
$result->{'copyrightdate'} = $1;
+ }
+ # modify publicationyear to keep only the 1st year found
+ my $temp = $result->{'publicationyear'};
+ $temp =~ m/c(\d\d\d\d)/; # search cYYYY first
+ if ($1>0) {
+ $result->{'publicationyear'} = $1;
+ } else { # if no cYYYY, get the 1st date.
+ $temp =~ m/(\d\d\d\d)/;
+ $result->{'publicationyear'} = $1;
}
return $result;
More information about the Koha-cvs
mailing list