koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/C4 Koha.pm,1.7,1.7.2.1


From: Andrew Arensburger
Subject: [Koha-cvs] CVS: koha/C4 Koha.pm,1.7,1.7.2.1
Date: Thu, 03 Oct 2002 19:25:21 -0700

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

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


Index: Koha.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Koha.pm,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -C2 -r1.7 -r1.7.2.1
*** Koha.pm     20 Sep 2002 12:49:47 -0000      1.7
--- Koha.pm     4 Oct 2002 02:25:19 -0000       1.7.2.1
***************
*** 21,25 ****
  use strict;
  require Exporter;
! use C4::Database;
  
  use vars qw($VERSION @ISA @EXPORT);
--- 21,25 ----
  use strict;
  require Exporter;
! use C4::Context;
  
  use vars qw($VERSION @ISA @EXPORT);
***************
*** 92,101 ****
  
      my $ethnicity = shift;
!     my $dbh=C4Connect;
      my $sth=$dbh->prepare("Select name from ethnicity where code = ?");
      $sth->execute($ethnicity);
      my $data=$sth->fetchrow_hashref;
      $sth->finish;
-     $dbh->disconnect;
      return $data->{'name'};
  }
--- 92,100 ----
  
      my $ethnicity = shift;
!     my $dbh = C4::Context->dbh;
      my $sth=$dbh->prepare("Select name from ethnicity where code = ?");
      $sth->execute($ethnicity);
      my $data=$sth->fetchrow_hashref;
      $sth->finish;
      return $data->{'name'};
  }
***************
*** 114,118 ****
  
  sub borrowercategories {
!     my $dbh=C4Connect;
      my $sth=$dbh->prepare("Select categorycode,description from categories 
order by description");
      $sth->execute;
--- 113,117 ----
  
  sub borrowercategories {
!     my $dbh = C4::Context->dbh;
      my $sth=$dbh->prepare("Select categorycode,description from categories 
order by description");
      $sth->execute;
***************
*** 124,128 ****
      }
      $sth->finish;
-     $dbh->disconnect;
      return(address@hidden,\%labels);
  }
--- 123,126 ----
***************
*** 141,145 ****
  
  sub ethnicitycategories {
!     my $dbh=C4Connect;
      my $sth=$dbh->prepare("Select code,name from ethnicity order by name");
      $sth->execute;
--- 139,143 ----
  
  sub ethnicitycategories {
!     my $dbh = C4::Context->dbh;
      my $sth=$dbh->prepare("Select code,name from ethnicity order by name");
      $sth->execute;
***************
*** 151,155 ****
      }
      $sth->finish;
-     $dbh->disconnect;
      return(address@hidden,\%labels);
  }
--- 149,152 ----




reply via email to

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