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

Andrew Arensburger arensb at users.sourceforge.net
Sat Oct 5 11:51:10 CEST 2002


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");





More information about the Koha-cvs mailing list