koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/C4 Reserves.pm,1.2,1.2.2.1


From: Andrew Arensburger
Subject: [Koha-cvs] CVS: koha/C4 Reserves.pm,1.2,1.2.2.1
Date: Thu, 03 Oct 2002 19:25:39 -0700

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

Modified Files:
      Tag: arensb-context
        Reserves.pm 
Log Message:
Use C4::Connect instead of C4::Database, C4::Connect->dbh instead
C4Connect.


Index: Reserves.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Reserves.pm,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -r1.2 -r1.2.2.1
*** Reserves.pm 14 Aug 2002 18:12:51 -0000      1.2
--- Reserves.pm 4 Oct 2002 02:25:37 -0000       1.2.2.1
***************
*** 25,29 ****
  require Exporter;
  use DBI;
! use C4::Database;
  use C4::Format;
  use C4::Accounts;
--- 25,29 ----
  require Exporter;
  use DBI;
! use C4::Context;
  use C4::Format;
  use C4::Accounts;
***************
*** 148,152 ****
          my @items = GetItems($env,$biblionumber);
                my $cnt_it = @items;
!       my $dbh = &C4Connect;
          my $query = "Select * from biblio where biblionumber = $biblionumber";
        my $sth = $dbh->prepare($query);
--- 148,152 ----
          my @items = GetItems($env,$biblionumber);
                my $cnt_it = @items;
!       my $dbh = C4::Context->dbh;
          my $query = "Select * from biblio where biblionumber = $biblionumber";
        my $sth = $dbh->prepare($query);
***************
*** 184,188 ****
          } else { $donext = "Circ" }  
        } 
-       $dbh->disconnect;
        }
      }
--- 184,187 ----
***************
*** 194,198 ****
    my ($env,$borrnum,$biblionumber,$constraint,$bibitems) = @_;
    #check for issues;
!   my $dbh = &C4Connect;
    my $const = lc substr($constraint,0,1);
    my $query = "select * from borrowers,categories 
--- 193,197 ----
    my ($env,$borrnum,$biblionumber,$constraint,$bibitems) = @_;
    #check for issues;
!   my $dbh = C4::Context->dbh;
    my $const = lc substr($constraint,0,1);
    my $query = "select * from borrowers,categories 
***************
*** 260,264 ****
      }
    }
-   $dbh->disconnect();
    return $fee;
  } # end CalcReserveFee
--- 259,262 ----
***************
*** 266,270 ****
  sub CreateReserve {
    my ($env,$branch,$borrnum,$biblionumber,$constraint,$bibitems,$fee) = @_;
!   my $dbh = &C4Connect;
    #$dbh->{RaiseError} = 1;
    #$dbh->{AutoCommit} = 0;
--- 264,268 ----
  sub CreateReserve {
    my ($env,$branch,$borrnum,$biblionumber,$constraint,$bibitems,$fee) = @_;
!   my $dbh = C4::Context->dbh;
    #$dbh->{RaiseError} = 1;
    #$dbh->{AutoCommit} = 0;
***************
*** 308,312 ****
    #  $dbh->rollback(); 
    #}
-   $dbh->disconnect();
    return();
  } # end CreateReserve    
--- 306,309 ----




reply via email to

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