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.65,1.66


From: Paul POULAIN
Subject: [Koha-cvs] CVS: koha/C4 Search.pm,1.65,1.66
Date: Mon, 19 May 2003 07:55:35 -0700

Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1:/tmp/cvs-serv25053/C4

Modified Files:
        Search.pm 
Log Message:
fixing strange bug when cardnumber not set and borrower does not exists : 
sometimes finded value anyway !

Index: Search.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Search.pm,v
retrieving revision 1.65
retrieving revision 1.66
diff -C2 -r1.65 -r1.66
*** Search.pm   8 May 2003 14:12:30 -0000       1.65
--- Search.pm   19 May 2003 14:55:32 -0000      1.66
***************
*** 1786,1789 ****
--- 1786,1790 ----
  sub borrdata {
    my ($cardnumber,$bornum)address@hidden;
+    warn "bornum $bornum";
    $cardnumber = uc $cardnumber;
    my $dbh = C4::Context->dbh;
***************
*** 1802,1811 ****
        return($data);
        } else { # try with firstname
!               my $sth=$dbh->prepare("select * from borrowers where 
firstname='$cardnumber'");
!               $sth->execute;
!               my $data=$sth->fetchrow_hashref;
!               $sth->finish;
!               return($data);
        }
  }
  
--- 1803,1815 ----
        return($data);
        } else { # try with firstname
!               if ($cardnumber) {
!                       my $sth=$dbh->prepare("select * from borrowers where 
firstname='$cardnumber'");
!                       $sth->execute;
!                       my $data=$sth->fetchrow_hashref;
!                       $sth->finish;
!                       return($data);
!               }
        }
+       return undef;
  }
  




reply via email to

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