Update of /cvsroot/koha/koha/C4 In directory usw-pr-cvs1:/tmp/cvs-serv30477/C4 Modified Files: Search.pm Log Message: Made a little change to allow the reading record to be sorted, and now defaults to the last 50 items borrowed Index: Search.pm =================================================================== RCS file: /cvsroot/koha/koha/C4/Search.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** Search.pm 2001/02/05 18:48:15 1.2 --- Search.pm 2001/06/20 03:36:01 1.3 *************** *** 575,579 **** items.holdingbranch "; # print $type; ! if ($type ne 'intra'){ $query.=" and (items.itemlost<>1 or items.itemlost is NULL) and (wthdrawn <> 1 or wthdrawn is NULL)"; --- 575,579 ---- items.holdingbranch "; # print $type; ! if ($type eq 'opac'){ $query.=" and (items.itemlost<>1 or items.itemlost is NULL) and (wthdrawn <> 1 or wthdrawn is NULL)"; *************** *** 925,935 **** sub allissues { ! my ($bornum)=@_; my $dbh=C4Connect; my $query; ! $query="Select * from issues,biblio,items where borrowernumber='$bornum' and ! items.itemnumber=issues.itemnumber and ! items.biblionumber=biblio.biblionumber order ! by date_due"; #print $query; my $sth=$dbh->prepare($query); --- 925,940 ---- sub allissues { ! my ($bornum,$order,$limit)=@_; my $dbh=C4Connect; my $query; ! $query="Select * from issues,biblio,items,biblioitems ! where borrowernumber='$bornum' and ! items.biblioitemnumber=biblioitems.biblioitemnumber and ! items.itemnumber=issues.itemnumber and ! items.biblionumber=biblio.biblionumber"; ! $query.=" order by $order"; ! if ($limit !=0){ ! $query.=" limit $limit"; ! } #print $query; my $sth=$dbh->prepare($query); *************** *** 1037,1041 **** my $query="Select * from items where biblionumber=$bibnum "; ! if ($type ne 'intra'){ $query.=" and (itemlost <>1 or itemlost is NULL) and (wthdrawn <> 1 or wthdrawn is NULL)"; --- 1042,1046 ---- my $query="Select * from items where biblionumber=$bibnum "; ! if ($type eq 'opac'){ $query.=" and (itemlost <>1 or itemlost is NULL) and (wthdrawn <> 1 or wthdrawn is NULL)"; *************** *** 1086,1090 **** } # if ($count == 0){ ! my $query2="Select * from aqorders where biblionumber=$bibnum"; my $sth2=$dbh->prepare($query2); $sth2->execute; --- 1091,1096 ---- } # if ($count == 0){ ! my $query2="Select * from aqorders where biblionumber=$bibnum and ! datecancellationprinted is NULL"; my $sth2=$dbh->prepare($query2); $sth2->execute;