koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/C4 SearchMarc.pm,1.25,1.26


From: Paul POULAIN
Subject: [Koha-cvs] CVS: koha/C4 SearchMarc.pm,1.25,1.26
Date: Mon, 13 Sep 2004 08:23:37 -0700

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

Modified Files:
        SearchMarc.pm 
Log Message:
warn removes + fix for item count

Index: SearchMarc.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/SearchMarc.pm,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** SearchMarc.pm       20 Aug 2004 09:14:07 -0000      1.25
--- SearchMarc.pm       13 Sep 2004 15:23:35 -0000      1.26
***************
*** 253,257 ****
        # HINT : biblionumber as bn is important. The hash is fills 
biblionumber with items.biblionumber.
        # so if you dont' has an item, you get a not nice epty value.
!       $sth = $dbh->prepare("SELECT biblio.biblionumber as bn,biblio.*, 
biblioitems.*, items.*,marc_biblio.bibid
                                                        FROM biblio, 
marc_biblio 
                                                        LEFT JOIN items on 
items.biblionumber = biblio.biblionumber
--- 253,257 ----
        # HINT : biblionumber as bn is important. The hash is fills 
biblionumber with items.biblionumber.
        # so if you dont' has an item, you get a not nice epty value.
!       $sth = $dbh->prepare("SELECT biblio.biblionumber as bn,count(*) as 
tot,biblio.*, biblioitems.*, items.*,marc_biblio.bibid
                                                        FROM biblio, 
marc_biblio 
                                                        LEFT JOIN items on 
items.biblionumber = biblio.biblionumber
***************
*** 263,271 ****
        my $totalitems=0;
        my $oldline;
- #     my ($biblionumber,$author,$title,$holdingbranch, $itemcallnumber, 
$bibid);
        my ($oldbibid, $oldauthor, $oldtitle);
        # parse all biblios between start & end.
        while (($counter <= $#result) && ($counter <= ($offset + $length))) {
- #             warn " bibid :".$result[$counter];
                # search & parse all items & note itemcallnumber
                $sth->execute($result[$counter]);
--- 263,269 ----
***************
*** 278,282 ****
                        # then all other fields in the main array
                        if ($oldbiblionumber && ($oldbiblionumber ne 
$line->{bn}) && $oldline) {
- #                     warn "HERE $oldbiblionumber && ($oldbiblionumber ne 
$line->{bn}) && $oldline";
                                my %newline;
                                %newline = %$oldline;
--- 276,279 ----
***************
*** 293,299 ****
                        $continue=0 unless $line->{bn};
                        if ($continue) {
- #                     warn "IN ".$line->{bn}."<<" if($line->{bn});
                                $oldbiblionumber = $line->{bn};
!                               $totalitems++ if ($line->{holdingbranch});
                                $oldline = $line;
                                # item callnumber & branch
--- 290,295 ----
                        $continue=0 unless $line->{bn};
                        if ($continue) {
                                $oldbiblionumber = $line->{bn};
!                               $totalitems +=$line->{tot} if 
($line->{holdingbranch});
                                $oldline = $line;
                                # item callnumber & branch
***************
*** 301,304 ****
--- 297,301 ----
                                $lineCN{holdingbranch} = $line->{holdingbranch};
                                $lineCN{itemcallnumber} = 
$line->{itemcallnumber};
+                               $lineCN{location} = $line->{location};
                                push @CNresults,\%lineCN;
                                $line = $sth->fetchrow_hashref;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]