[Koha-cvs] CVS: koha/C4/Circulation Circ2.pm,1.96,1.97

Chris Cormack rangi at users.sourceforge.net
Thu Sep 1 01:11:21 CEST 2005


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

Modified Files:
	Circ2.pm 
Log Message:
Fix for loanlength to make the default length work properly


Index: Circ2.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Circulation/Circ2.pm,v
retrieving revision 1.96
retrieving revision 1.97
diff -C2 -r1.96 -r1.97
*** Circ2.pm	4 Aug 2005 13:27:37 -0000	1.96
--- Circ2.pm	31 Aug 2005 23:11:19 -0000	1.97
***************
*** 918,950 ****
  	$sth->execute($borrowertype,$itemtype,$branchcode);
  	my $loanlength = $sth->fetchrow_hashref;
! 	return $loanlength->{issuelength} if defined($loanlength);
  	
  	$sth->execute($borrowertype,$itemtype,"");
  	my $loanlength = $sth->fetchrow_hashref;
! 	return $loanlength->{issuelength} if defined($loanlength);
  	
  	$sth->execute($borrowertype,"*",$branchcode);
  	my $loanlength = $sth->fetchrow_hashref;
! 	return $loanlength->{issuelength} if defined($loanlength);
  
  	$sth->execute("*",$itemtype,$branchcode);
  	my $loanlength = $sth->fetchrow_hashref;
! 	return $loanlength->{issuelength} if defined($loanlength);
  
  	$sth->execute($borrowertype,"*","");
  	my $loanlength = $sth->fetchrow_hashref;
! 	return $loanlength->{issuelength} if defined($loanlength);
  
  	$sth->execute("*","*",$branchcode);
  	my $loanlength = $sth->fetchrow_hashref;
! 	return $loanlength->{issuelength} if defined($loanlength);
  
  	$sth->execute("*",$itemtype,"");
  	my $loanlength = $sth->fetchrow_hashref;
! 	return $loanlength->{issuelength} if defined($loanlength);
  
  	$sth->execute("*","*","");
  	my $loanlength = $sth->fetchrow_hashref;
! 	return $loanlength->{issuelength} if defined($loanlength);
  
  	# if no rule is set => 21 days (hardcoded)
--- 918,950 ----
  	$sth->execute($borrowertype,$itemtype,$branchcode);
  	my $loanlength = $sth->fetchrow_hashref;
! 	return $loanlength->{issuelength} if defined($loanlength) && $loanlength->{issuelength} ne 'NULL';
  	
  	$sth->execute($borrowertype,$itemtype,"");
  	my $loanlength = $sth->fetchrow_hashref;
! 	return $loanlength->{issuelength} if defined($loanlength) && $loanlength->{issuelength} ne 'NULL';
  	
  	$sth->execute($borrowertype,"*",$branchcode);
  	my $loanlength = $sth->fetchrow_hashref;
! 	return $loanlength->{issuelength} if defined($loanlength) && $loanlength->{issuelength} ne 'NULL';
  
  	$sth->execute("*",$itemtype,$branchcode);
  	my $loanlength = $sth->fetchrow_hashref;
! 	return $loanlength->{issuelength} if defined($loanlength) && $loanlength->{issuelength} ne 'NULL';
  
  	$sth->execute($borrowertype,"*","");
  	my $loanlength = $sth->fetchrow_hashref;
! 	return $loanlength->{issuelength} if defined($loanlength) && $loanlength->{issuelength} ne 'NULL';
  
  	$sth->execute("*","*",$branchcode);
  	my $loanlength = $sth->fetchrow_hashref;
! 	return $loanlength->{issuelength} if defined($loanlength) && $loanlength->{issuelength} ne 'NULL';
  
  	$sth->execute("*",$itemtype,"");
  	my $loanlength = $sth->fetchrow_hashref;
! 	return $loanlength->{issuelength} if defined($loanlength) && $loanlength->{issuelength} ne 'NULL';
  
  	$sth->execute("*","*","");
  	my $loanlength = $sth->fetchrow_hashref;
! 	return $loanlength->{issuelength} if defined($loanlength) && $loanlength->{issuelength} ne 'NULL';
  
  	# if no rule is set => 21 days (hardcoded)





More information about the Koha-cvs mailing list