koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/C4 Search.pm,1.18.2.13,1.18.2.14


From: Steve Tonnesen
Subject: [Koha-cvs] CVS: koha/C4 Search.pm,1.18.2.13,1.18.2.14
Date: Fri, 25 Oct 2002 09:36:35 -0700

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

Modified Files:
      Tag: rel-1-2
        Search.pm 
Log Message:
Fixes mysql syntax errors logged to apache log files when performing subject
searches.


Index: Search.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Search.pm,v
retrieving revision 1.18.2.13
retrieving revision 1.18.2.14
diff -C2 -r1.18.2.13 -r1.18.2.14
*** Search.pm   11 Oct 2002 05:25:12 -0000      1.18.2.13
--- Search.pm   25 Oct 2002 16:36:32 -0000      1.18.2.14
***************
*** 1072,1088 ****
            }
  #print STDERR "$query\n";
-   my $sti=$dbh->prepare($query);
-   $sti->execute;
    my $dewey;
    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){
      if ($count > $offset && $count <= $limit){
--- 1072,1092 ----
            }
  #print STDERR "$query\n";
    my $dewey;
    my $subclass;
    my $true=0;
!   if ($type eq 'subject') {
!       $true=1;
!   } else {
!       my $sti=$dbh->prepare($query);
!       $sti->execute;
!       if (($dewey, $subclass) = $sti->fetchrow){
!       $true=1;
!       }
!       $dewey=~s/\.*0*$//;
!       ($dewey == 0) && ($dewey='');
!       ($dewey) && ($dewey.=" $subclass");
!       $data->{'dewey'}=$dewey;
!       $sti->finish;
    }
    if ($true == 1){
      if ($count > $offset && $count <= $limit){
***************
*** 2183,2194 ****
      $sth2->finish;     
    } 
!   my $query2="Select * from aqorders where biblionumber=$bibnum and
!   datecancellationprinted is NULL and quantity > quantityreceived";
!   my $sth2=$dbh->prepare($query2);
!   $sth2->execute;
!   if (my $data=$sth2->fetchrow_hashref){
!       $counts{'order'}=$data->{'quantity'} - $data->{'quantityreceived'};
    }
-   $sth2->finish;
    $sth->finish; 
    $dbh->disconnect;                   
--- 2187,2200 ----
      $sth2->finish;     
    } 
!   if ($bibnum) {
!       my $query2="Select * from aqorders where biblionumber=$bibnum and
!       datecancellationprinted is NULL and quantity > quantityreceived";
!       my $sth2=$dbh->prepare($query2);
!       $sth2->execute;
!       if (my $data=$sth2->fetchrow_hashref){
!         $counts{'order'}=$data->{'quantity'} - $data->{'quantityreceived'};
!       }
!       $sth2->finish;
    }
    $sth->finish; 
    $dbh->disconnect;                   




reply via email to

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