[Koha-cvs] CVS: koha/C4 Search.pm,1.18.2.11,1.18.2.12

Finlay Thompson finlayt at users.sourceforge.net
Thu Oct 3 06:14:07 CEST 2002


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

Modified Files:
      Tag: rel-1-2
	Search.pm 
Log Message:

added fix for opac do-it-yourself reserves into rel-1-2


Index: Search.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Search.pm,v
retrieving revision 1.18.2.11
retrieving revision 1.18.2.12
diff -C2 -r1.18.2.11 -r1.18.2.12
*** Search.pm	20 Sep 2002 12:51:51 -0000	1.18.2.11
--- Search.pm	3 Oct 2002 04:14:04 -0000	1.18.2.12
***************
*** 1122,1126 ****
  #'
  sub subsearch {
!   my ($env,$subject)=@_;
    my $dbh=C4Connect();
    $subject=$dbh->quote($subject);
--- 1122,1126 ----
  #'
  sub subsearch {
!   my ($env,$subject, $num, $offset)=@_;
    my $dbh=C4Connect();
    $subject=$dbh->quote($subject);
***************
*** 1135,1138 ****
--- 1135,1139 ----
    while (my $data=$sth->fetchrow_hashref){
      #$results[$i]="$data->{'title'}\t$data->{'author'}\t$data->{'biblionumber'}";
+     next unless ($i > $offset || $i < ($num+$offset));
      my $dewey= $data->{'dewey'};                
      my $subclass=$data->{'subclass'};          
***************
*** 2281,2305 ****
  #'
  sub barcodes{
!   #called from request.pl
!   my ($biblioitemnumber)=@_;
!   my $dbh=C4Connect;
!   my $query="Select barcode from items where
!    biblioitemnumber='$biblioitemnumber'
!    and ((itemlost <> 1 and itemlost <> 2) or itemlost is NULL) and
!    (wthdrawn <> 1 or wthdrawn is NULL)";
! 
!   my $sth=$dbh->prepare($query);
!   $sth->execute;
!   my @barcodes;
!   my $i=0;
!   while (my $data=$sth->fetchrow_hashref){
!     $barcodes[$i]=$data->{'barcode'};
!     $i++;
!   }
!   $sth->finish;
!   $dbh->disconnect;
!   return(@barcodes);
!   
  }
  
  =item getwebsites
--- 2282,2304 ----
  #'
  sub barcodes{
!     #called from request.pl
!     my ($biblioitemnumber)=@_;
!     my $dbh=C4Connect;
!     my $query="SELECT barcode, itemlost, holdingbranch FROM items
!                            WHERE biblioitemnumber = ?
!                              AND (wthdrawn <> 1 OR wthdrawn IS NULL)";
!     my $sth=$dbh->prepare($query);
!     $sth->execute($biblioitemnumber);
!     my @barcodes;
!     my $i=0;
!     while (my $data=$sth->fetchrow_hashref){
! 	$barcodes[$i]=$data;
! 	$i++;
!     }
!     $sth->finish;
!     $dbh->disconnect;
!     return(@barcodes);
  }
+ 
  
  =item getwebsites





More information about the Koha-cvs mailing list