[Koha-cvs] CVS: koha/C4 Search.pm,1.33,1.34
Chris Cormack
rangi at users.sourceforge.net
Thu Aug 15 04:02:43 CEST 2002
- Previous message: [Koha-cvs] CVS: koha/circ returns.pl,NONE,1.13.2.1 selectbranchprinter.pl,NONE,1.3.2.1 branchtransfers.pl,1.3.2.1,1.3.2.2 circulation.pl,1.23.2.3,1.23.2.4
- Next message: [Koha-cvs] CVS: koha/C4 Search.pm,1.18.2.7,1.18.2.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/koha/koha/C4
In directory usw-pr-cvs1:/tmp/cvs-serv6628/C4
Modified Files:
Search.pm
Log Message:
Fix for last borrower for the moredetail.pl page
sCVS:
Index: Search.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Search.pm,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -r1.33 -r1.34
*** Search.pm 14 Aug 2002 18:12:51 -0000 1.33
--- Search.pm 15 Aug 2002 02:02:40 -0000 1.34
***************
*** 123,127 ****
}
}
! if ($env->{itemcount}) {
foreach my $data (@results){
my ($counts) = itemcount2($env, $data->{'biblionumber'}, 'intra');
--- 123,127 ----
}
}
! if ($env->{itemcount} eq '1') {
foreach my $data (@results){
my ($counts) = itemcount2($env, $data->{'biblionumber'}, 'intra');
***************
*** 337,340 ****
--- 337,341 ----
$sth->finish;
$data2->{'dewey'}=$dewey;
+
$res2[$i]=$data2;
# $res2[$i]="$data2->{'author'}\t$data2->{'title'}\t$data2->{'biblionumber'}\t$data2->{'copyrightdate'}\t$dewey";
***************
*** 561,565 ****
$query.= " and (abstract like '%$search->{'abstract'}%')";
}
!
$query.=" group by biblio.biblionumber";
--- 562,568 ----
$query.= " and (abstract like '%$search->{'abstract'}%')";
}
! if ($search->{'date-before'} ne ''){
! $query.= " and (copyrightdate like '%$search->{'date-before'}%')";
! }
$query.=" group by biblio.biblionumber";
***************
*** 608,611 ****
--- 611,617 ----
$query.= " and (abstract like '%$search->{'abstract'}%')";
}
+ if ($search->{'date-before'} ne ''){
+ $query.= " and (copyrightdate like '%$search->{'date-before'}%')";
+ }
} elsif ($search->{'class'} ne ''){
$query="select * from biblioitems,biblio where biblio.biblionumber=biblioitems.biblionumber";
***************
*** 636,639 ****
--- 642,648 ----
} elsif ($search->{'abstract'} ne ''){
$query.= "Select * from biblio where abstract like '%$search->{'abstract'}%'";
+
+ } elsif ($search->{'date-before'} ne ''){
+ $query.= "Select * from biblio where copyrightdate like '%$search->{'date-before'}%'";
}
$query .=" group by biblio.biblionumber";
***************
*** 716,720 ****
my $limit= $num+$offset;
while (my $data=$sth->fetchrow_hashref){
! my $query="select dewey,subclass from biblioitems where biblionumber=$data->{'biblionumber'}";
if ($search->{'class'} ne ''){
my @temp=split(/\|/,$search->{'class'});
--- 725,729 ----
my $limit= $num+$offset;
while (my $data=$sth->fetchrow_hashref){
! my $query="select dewey,subclass,publishercode from biblioitems where biblionumber=$data->{'biblionumber'}";
if ($search->{'class'} ne ''){
my @temp=split(/\|/,$search->{'class'});
***************
*** 735,739 ****
$query.= " and (publishercode like '%$search->{'publisher'}%')";
}
! #print STDERR "$query\n";
my $sti=$dbh->prepare($query);
$sti->execute;
--- 744,748 ----
$query.= " and (publishercode like '%$search->{'publisher'}%')";
}
!
my $sti=$dbh->prepare($query);
$sti->execute;
***************
*** 741,751 ****
my $subclass;
my $true=0;
! if (($dewey, $subclass) = $sti->fetchrow || $type eq 'subject'){
$true=1;
}
$dewey=~s/\.*0*$//;
($dewey == 0) && ($dewey='');
($dewey) && ($dewey.=" $subclass");
$data->{'dewey'}=$dewey;
$sti->finish;
if ($true == 1){
--- 750,767 ----
my $subclass;
my $true=0;
! my $publishercode;
! my $bibitemdata;
! if ($bibitemdata = $sti->fetchrow_hashref() || $type eq 'subject'){
$true=1;
+ $dewey=$bibitemdata->{'dewey'};
+ $subclass=$bibitemdata->{'subclass'};
+ $publishercode=$bibitemdata->{'publishercode'};
}
+ print STDERR "$dewey $subclass $publishercode\n";
$dewey=~s/\.*0*$//;
($dewey == 0) && ($dewey='');
($dewey) && ($dewey.=" $subclass");
$data->{'dewey'}=$dewey;
+ $data->{'publishercode'}=$publishercode;
$sti->finish;
if ($true == 1){
***************
*** 968,972 ****
$sth->execute;
while (my $dat = $sth->fetchrow_hashref){
! $data->{'subject'} .= " | $dat->{'subject'}";
} # while
--- 984,988 ----
$sth->execute;
while (my $dat = $sth->fetchrow_hashref){
! $data->{'subject'} .= " , $dat->{'subject'}";
} # while
***************
*** 1086,1090 ****
where itemnumber = '$data->{'itemnumber'}'
and issues.borrowernumber = borrowers.borrowernumber
! order by date_due desc";
$sth2 = $dbh->prepare($query2)
|| die $dbh->errstr;
--- 1102,1107 ----
where itemnumber = '$data->{'itemnumber'}'
and issues.borrowernumber = borrowers.borrowernumber
! and returndate is not NULL
! order by returndate desc,timestamp desc";
$sth2 = $dbh->prepare($query2)
|| die $dbh->errstr;
***************
*** 1385,1389 ****
$sth2->execute;
if (my $data2=$sth2->fetchrow_hashref){
! $counts{'notavailable'}++;
} else {
$counts{$data->{'branchname'}}++;
--- 1402,1406 ----
$sth2->execute;
if (my $data2=$sth2->fetchrow_hashref){
! $counts{'not available'}++;
} else {
$counts{$data->{'branchname'}}++;
- Previous message: [Koha-cvs] CVS: koha/circ returns.pl,NONE,1.13.2.1 selectbranchprinter.pl,NONE,1.3.2.1 branchtransfers.pl,1.3.2.1,1.3.2.2 circulation.pl,1.23.2.3,1.23.2.4
- Next message: [Koha-cvs] CVS: koha/C4 Search.pm,1.18.2.7,1.18.2.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Koha-cvs
mailing list