[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/C4/Circulation Borrower.pm,1.2,1.3
From: |
Andrew Arensburger |
Subject: |
[Koha-cvs] CVS: koha/C4/Circulation Borrower.pm,1.2,1.3 |
Date: |
Sat, 05 Oct 2002 02:53:57 -0700 |
Update of /cvsroot/koha/koha/C4/Circulation
In directory usw-pr-cvs1:/tmp/cvs-serv23293/C4/Circulation
Modified Files:
Borrower.pm
Log Message:
Merged with arensb-context branch: use C4::Context->dbh instead of
&C4Connect, and generally prefer C4::Context over C4::Database.
Index: Borrower.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Circulation/Borrower.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** Borrower.pm 14 Aug 2002 18:12:52 -0000 1.2
--- Borrower.pm 5 Oct 2002 09:53:55 -0000 1.3
***************
*** 25,34 ****
require Exporter;
use DBI;
! use C4::Database;
use C4::Accounts;
use C4::InterfaceCDK;
use C4::Interface::FlagsCDK;
use C4::Circulation::Main;
use C4::Circulation::Issues;
use C4::Circulation::Renewals;
use C4::Scan;
--- 25,38 ----
require Exporter;
use DBI;
! use C4::Context;
use C4::Accounts;
use C4::InterfaceCDK;
use C4::Interface::FlagsCDK;
use C4::Circulation::Main;
+ # FIXME - C4::Circulation::Main and C4::Circulation::Borrower
+ # use each other, so functions get redefined.
use C4::Circulation::Issues;
+ # FIXME - C4::Circulation::Issues and C4::Circulation::Borrower
+ # use each other, so functions get redefined.
use C4::Circulation::Renewals;
use C4::Scan;
***************
*** 218,221 ****
--- 222,226 ----
my ($nowaiting,$itemswaiting) =
&C4::Circulation::Main::checkwaiting($env,$dbh,$bornum);
if ($nowaiting > 0) { push (@traps_set,"WAITING"); }
+ # FIXME - This should be $traps_set[0], right?
if (@traps_set[0] ne "" ) {
($issuesallowed,$traps_done,$amount,$odues) =
***************
*** 319,323 ****
sub Borenq {
my ($env)address@hidden;
! my $dbh=C4Connect;
#get borrower guff
my $bornum;
--- 324,328 ----
sub Borenq {
my ($env)address@hidden;
! my $dbh = C4::Context->dbh;
#get borrower guff
my $bornum;
***************
*** 338,342 ****
}
}
- $dbh->disconnect;
}
return $reason;
--- 343,346 ----
***************
*** 351,355 ****
sub reserveslist {
my ($env,$borrower,$amount,$odues,$waiting) = @_;
! my $dbh=C4Connect;
my @items;
my $x=0;
--- 355,359 ----
sub reserveslist {
my ($env,$borrower,$amount,$odues,$waiting) = @_;
! my $dbh = C4::Context->dbh;
my @items;
my $x=0;
***************
*** 367,375 ****
$sth->finish;
reservesdisplay($env,$borrower,$amount,$odues,address@hidden);
- $dbh->disconnect;
}
sub NewBorrowerNumber {
! my $dbh=C4Connect;
my $sth=$dbh->prepare("Select max(borrowernumber) from borrowers");
$sth->execute;
--- 371,378 ----
$sth->finish;
reservesdisplay($env,$borrower,$amount,$odues,address@hidden);
}
sub NewBorrowerNumber {
! my $dbh = C4::Context->dbh;
my $sth=$dbh->prepare("Select max(borrowernumber) from borrowers");
$sth->execute;
***************
*** 378,387 ****
$data->{'max(borrowernumber)'}++;
return($data->{'max(borrowernumber)'});
- $dbh->disconnect;
}
sub findguarantees{
my ($bornum)address@hidden;
! my $dbh=C4Connect;
my $query="select cardnumber,borrowernumber from borrowers where
guarantor='$bornum'";
--- 381,389 ----
$data->{'max(borrowernumber)'}++;
return($data->{'max(borrowernumber)'});
}
sub findguarantees{
my ($bornum)address@hidden;
! my $dbh = C4::Context->dbh;
my $query="select cardnumber,borrowernumber from borrowers where
guarantor='$bornum'";
***************
*** 395,399 ****
}
$sth->finish;
- $dbh->disconnect;
return($i,address@hidden);
}
--- 397,400 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/C4/Circulation Borrower.pm,1.2,1.3,
Andrew Arensburger <=