[Koha-cvs] CVS: koha/C4 Search.pm,1.65,1.66
Paul POULAIN
tipaul at users.sourceforge.net
Mon May 19 16:55:35 CEST 2003
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)=@_;
+ 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;
}
More information about the Koha-cvs
mailing list