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

Andrew Arensburger arensb at users.sourceforge.net
Sat Oct 5 11:53:32 CEST 2002


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

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


Index: Stock.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Stock.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** Stock.pm	28 Sep 2002 04:58:32 -0000	1.4
--- Stock.pm	5 Oct 2002 09:53:30 -0000	1.5
***************
*** 23,27 ****
  
  use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
! use C4::Database;
  
  # set the version for version checking
--- 23,27 ----
  
  use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
! use C4::Context;
  
  # set the version for version checking
***************
*** 35,39 ****
  # obsolete.
  sub stockreport {
!   my $dbh=C4Connect;
    my @results;
    my $query="Select count(*) from items where homebranch='C'";
--- 35,39 ----
  # obsolete.
  sub stockreport {
!   my $dbh = C4::Context->dbh;
    my @results;
    my $query="Select count(*) from items where homebranch='C'";
***************
*** 49,53 ****
    $results[1]="$count->{'count'}\t Foxton";
    $sth->finish;
-   $dbh->disconnect;
    return(@results);
  }
--- 49,52 ----





More information about the Koha-cvs mailing list