[Koha-cvs] CVS: koha/C4 Biblio.pm,1.115.2.18,1.115.2.19

Henri-Damien LAURENT hdl at users.sourceforge.net
Fri Aug 26 14:28:59 CEST 2005


Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25776/C4

Modified Files:
      Tag: rel_2_2
	Biblio.pm 
Log Message:
Adding a test on a temporary value before processing it in Biblio.pm
Adding branchcode fields to aqbookfund and aqbasket.


Index: Biblio.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Biblio.pm,v
retrieving revision 1.115.2.18
retrieving revision 1.115.2.19
diff -C2 -r1.115.2.18 -r1.115.2.19
*** Biblio.pm	2 Aug 2005 07:45:44 -0000	1.115.2.18
--- Biblio.pm	26 Aug 2005 12:28:57 -0000	1.115.2.19
***************
*** 1098,1116 ****
  # 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.
! 		$temp =~ m/(\d\d\d\d)/;
! 		$result->{'copyrightdate'} = $1;
  	}
  # modify publicationyear to keep only the 1st year found
  	$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;
--- 1098,1120 ----
  # modify copyrightdate to keep only the 1st year found
  	my $temp = $result->{'copyrightdate'};
! 	if ($temp){
! 		$temp =~ m/c(\d\d\d\d)/; # search cYYYY first
! 		if ($1>0) {
! 			$result->{'copyrightdate'} = $1;
! 		} else { # if no cYYYY, get the 1st date.
! 			$temp =~ m/(\d\d\d\d)/;
! 			$result->{'copyrightdate'} = $1;
! 		}
  	}
  # modify publicationyear to keep only the 1st year found
  	$temp = $result->{'publicationyear'};
! 	if ($temp){
! 		$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;
***************
*** 2738,2741 ****
--- 2742,2749 ----
  # $Id$
  # $Log$
+ # Revision 1.115.2.19  2005/08/26 12:28:57  hdl
+ # Adding a test on a temporary value before processing it in Biblio.pm
+ # Adding branchcode fields to aqbookfund and aqbasket.
+ #
  # Revision 1.115.2.18  2005/08/02 07:45:44  tipaul
  # fix for bug http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=1009





More information about the Koha-cvs mailing list