koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/acqui.simple marcimport.pl,1.13,1.14


From: Andrew Arensburger
Subject: [Koha-cvs] CVS: koha/acqui.simple marcimport.pl,1.13,1.14
Date: Sat, 05 Oct 2002 02:56:16 -0700

Update of /cvsroot/koha/koha/acqui.simple
In directory usw-pr-cvs1:/tmp/cvs-serv24235/acqui.simple

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


Index: marcimport.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui.simple/marcimport.pl,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** marcimport.pl       14 Aug 2002 18:12:52 -0000      1.13
--- marcimport.pl       5 Oct 2002 09:56:14 -0000       1.14
***************
*** 35,38 ****
--- 35,39 ----
  
  # Koha modules used
+ use C4::Context;
  use C4::Database;
  use C4::Acquisitions;
***************
*** 48,69 ****
  # Constants
  
! my %configfile;
! open (KC, "/etc/koha.conf");
! while (<KC>) {
!  chomp;
!  (next) if (/^\s*#/);
!  if (/(.*)\s*=\s*(.*)/) {
!    my $variable=$1;
!    my $value=$2;
!    # Clean up white space at beginning and end
!    $variable=~s/^\s*//g;
!    $variable=~s/\s*$//g;
!    $value=~s/^\s*//g;
!    $value=~s/\s*$//g;
!    $configfile{$variable}=$value;
!  }
! }
! my $includes=$configfile{'includes'};
! ($includes) || ($includes="/usr/local/www/hdl/htdocs/includes");
  
  # HTML colors for alternating lines
--- 49,54 ----
  # Constants
  
! my $includes = C4::Context->config('includes') ||
!       "/usr/local/www/hdl/htdocs/includes";
  
  # HTML colors for alternating lines
***************
*** 78,82 ****
  
  my $input = new CGI;
! my $dbh=C4Connect;
  
  #-------------
--- 63,67 ----
  
  my $input = new CGI;
! my $dbh = C4::Context->dbh;
  
  #-------------
***************
*** 259,262 ****
--- 244,248 ----
      my $record;
      my ($numrecords,$resultsid,$data,$startdate,$enddate);
+               # FIXME - there's already a $data a few lines above.
      
      requireDBI($dbh,"ListFileRecords");
***************
*** 551,554 ****
--- 537,541 ----
        from z3950servers 
        order by rank");
+               # FIXME - There's already a $sth in this function.
      $sth->execute;
      my $serverlist='';
***************
*** 752,755 ****
--- 739,743 ----
      if ($numrecord) {
        for (my $i==1;$i<$numrecord;$i++) {
+               # FIXME - This "==" was supposed to be a "=", right?
            $record=$file->next;
        }
***************
*** 1006,1009 ****
--- 994,1006 ----
  #---------------
  # $Log$
+ # Revision 1.14  2002/10/05 09:56:14  arensb
+ # Merged with arensb-context branch: use C4::Context->dbh instead of
+ # &C4Connect, and generally prefer C4::Context over C4::Database.
+ #
+ # Revision 1.13.2.1  2002/10/04 02:52:50  arensb
+ # Use C4::Connect instead of C4::Database, C4::Connect->dbh instead
+ # C4Connect.
+ # Removed old code for reading /etc/koha.conf.
+ #
  # Revision 1.13  2002/08/14 18:12:52  tonnesen
  # Added copyright statement to all .pl and .pm files




reply via email to

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