[Koha-cvs] CVS: koha memberentry.pl,1.10,1.11

Andrew Arensburger arensb at users.sourceforge.net
Sat Oct 5 11:45:57 CEST 2002


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

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


Index: memberentry.pl
===================================================================
RCS file: /cvsroot/koha/koha/memberentry.pl,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** memberentry.pl	22 Sep 2002 16:49:30 -0000	1.10
--- memberentry.pl	5 Oct 2002 09:45:55 -0000	1.11
***************
*** 23,30 ****
  
  use strict;
  use C4::Output;
  use CGI;
  use C4::Search;
- use C4::Database;
  use C4::Koha;
  use HTML::Template;
--- 23,30 ----
  
  use strict;
+ use C4::Context;
  use C4::Output;
  use CGI;
  use C4::Search;
  use C4::Koha;
  use HTML::Template;
***************
*** 68,72 ****
    #
    if ($cardnumber eq '' && $systemprefs{'autoMemberNum'} eq '1') {
!     my $dbh=C4Connect;
      my $query="select max(substring(borrowers.cardnumber,2,7)) from borrowers";
      my $sth=$dbh->prepare($query);
--- 68,72 ----
    #
    if ($cardnumber eq '' && $systemprefs{'autoMemberNum'} eq '1') {
!     my $dbh = C4::Context->dbh;
      my $query="select max(substring(borrowers.cardnumber,2,7)) from borrowers";
      my $sth=$dbh->prepare($query);
***************
*** 75,79 ****
      $cardnumber=$data->{'max(substring(borrowers.cardnumber,2,7))'};
      $sth->finish;
-     $dbh->disconnect;
      # purpose: generate checksum'd member numbers.
      # We'll assume we just got the max value of digits 2-8 of member #'s from the database and our job is to
--- 75,78 ----





More information about the Koha-cvs mailing list