koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/misc fines2.pl,1.6,1.7


From: Andrew Arensburger
Subject: [Koha-cvs] CVS: koha/misc fines2.pl,1.6,1.7
Date: Sat, 05 Oct 2002 03:15:37 -0700

Update of /cvsroot/koha/koha/misc
In directory usw-pr-cvs1:/tmp/cvs-serv31462/misc

Modified Files:
        fines2.pl 
Log Message:
Merged with arensb-context branch: use C4::Context->dbh instead of
&C4Connect, and generally prefer C4::Context over C4::Database.


Index: fines2.pl
===================================================================
RCS file: /cvsroot/koha/koha/misc/fines2.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** fines2.pl   14 Aug 2002 18:12:54 -0000      1.6
--- fines2.pl   5 Oct 2002 10:15:35 -0000       1.7
***************
*** 27,31 ****
  # Suite 330, Boston, MA  02111-1307 USA
  
! use C4::Database;
  use C4::Search;
  use C4::Circulation::Circ2;
--- 27,31 ----
  # Suite 330, Boston, MA  02111-1307 USA
  
! use C4::Context;
  use C4::Search;
  use C4::Circulation::Circ2;
***************
*** 106,110 ****
                                                   # separate function
                                                   #
!        my $dbh=C4Connect;
         my $query="Select * from borrowers where 
borrowernumber='$borrower->{'guarantor'}'";
         my $sth=$dbh->prepare($query);
--- 106,110 ----
                                                   # separate function
                                                   #
!        my $dbh = C4::Context->dbh;
         my $query="Select * from borrowers where 
borrowernumber='$borrower->{'guarantor'}'";
         my $sth=$dbh->prepare($query);
***************
*** 112,116 ****
         my $tdata=$sth->fetchrow_hashref;
         $sth->finish;
-        $dbh->disconnect;
         $borrower->{'phone'}=$tdata->{'phone'};
         }
--- 112,115 ----
***************
*** 128,132 ****
        if ($borrower->{'cardnumber'} ne ''){
          my $cost=ReplacementCost($data->[$i]->{'itemnumber'});        
!       my $dbh=C4Connect;
        my $env;
        my 
$accountno=C4::Circulation::Circ2::getnextacctno($env,$data->[$i]->{'borrowernumber'},$dbh);
--- 127,131 ----
        if ($borrower->{'cardnumber'} ne ''){
          my $cost=ReplacementCost($data->[$i]->{'itemnumber'});        
!       my $dbh = C4::Context->dbh;
        my $env;
        my 
$accountno=C4::Circulation::Circ2::getnextacctno($env,$data->[$i]->{'borrowernumber'},$dbh);
***************
*** 153,157 ****
                   #
        }
-       $dbh->disconnect;
        }
      }
--- 152,155 ----




reply via email to

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