[Koha-cvs] CVS: koha/C4 Reserves2.pm,1.10,1.11

Finlay Thompson finlayt at users.sourceforge.net
Thu Jul 25 23:41:12 CEST 2002


Update of /cvsroot/koha/koha/C4
In directory usw-pr-cvs1:/tmp/cvs-serv9034/C4

Modified Files:
	Reserves2.pm 
Log Message:

Changed FindReserves so that it gets biblioitem data if the reserve has a reserve constraint.


Index: Reserves2.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Reserves2.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** Reserves2.pm	24 Jul 2002 04:00:33 -0000	1.10
--- Reserves2.pm	25 Jul 2002 21:41:10 -0000	1.11
***************
*** 5,8 ****
--- 5,9 ----
  use DBI;
  use C4::Database;
+ use C4::Search;
  #use C4::Accounts;
  
***************
*** 52,57 ****
    my @results;
    while (my $data=$sth->fetchrow_hashref){
!     $results[$i]=$data;
!     $i++;
    }
  #  print $query;
--- 53,75 ----
    my @results;
    while (my $data=$sth->fetchrow_hashref){
!       if ($data->{'constrainttype'} eq 'o') {
! 	  my $conquery = "SELECT biblioitemnumber FROM reserveconstraints 
!                            WHERE biblionumber   = ? 
!                              AND borrowernumber = ?
!                              AND reservedate    = ?";
! 	  my $csth=$dbh->prepare($conquery);
! 	  my $bibn = $data->{'biblionumber'};
! 	  my $born = $data->{'borrowernumber'};
! 	  my $resd = $data->{'reservedate'};
! 	  $csth->execute($bibn, $born, $resd);
! 	  my ($bibitemno) = $csth->fetchrow_array;
! 	  $csth->finish;
! 	  my $bdata = C4::Search::bibitemdata($bibitemno);
! 	  foreach my $key (keys %$bdata) {
! 	      $data->{$key} = $bdata->{$key};
! 	  }
!       }
!       $results[$i]=$data;
!       $i++;
    }
  #  print $query;





More information about the Koha-cvs mailing list