koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/C4 Groups.pm,1.4,1.5


From: Andrew Arensburger
Subject: [Koha-cvs] CVS: koha/C4 Groups.pm,1.4,1.5
Date: Sat, 05 Oct 2002 02:51:10 -0700

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

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


Index: Groups.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Groups.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** Groups.pm   28 Sep 2002 04:58:18 -0000      1.4
--- Groups.pm   5 Oct 2002 09:51:08 -0000       1.5
***************
*** 28,32 ****
  require Exporter;
  use DBI;
! use C4::Database;
  use C4::Circulation::Circ2;
  #use C4::Accounts;
--- 28,32 ----
  require Exporter;
  use DBI;
! use C4::Context;
  use C4::Circulation::Circ2;
  #use C4::Accounts;
***************
*** 51,55 ****
      my ($env) = @_;
      my %groups;
!     my $dbh=&C4Connect;  
      my $sth=$dbh->prepare("select distinct groupshortname,grouplongname from 
borrowergroups");
      $sth->execute;
--- 51,55 ----
      my ($env) = @_;
      my %groups;
!     my $dbh = C4::Context->dbh;
      my $sth=$dbh->prepare("select distinct groupshortname,grouplongname from 
borrowergroups");
      $sth->execute;
***************
*** 57,61 ****
        $groups{$short}=$long;
      }
-     $dbh->disconnect;
      return (\%groups);
  }
--- 57,60 ----
***************
*** 64,68 ****
      my ($env, $group) = @_;
      my @members;
!     my $dbh=&C4Connect;
      my $q_group=$dbh->quote($group);
      my $sth=$dbh->prepare("select borrowernumber from borrowergroups where 
groupshortname=$q_group");
--- 63,67 ----
      my ($env, $group) = @_;
      my @members;
!     my $dbh = C4::Context->dbh;
      my $q_group=$dbh->quote($group);
      my $sth=$dbh->prepare("select borrowernumber from borrowergroups where 
groupshortname=$q_group");




reply via email to

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