[Koha-cvs] CVS: koha/acqui.simple marcimport.pl,1.13,1.13.2.1
Andrew Arensburger
arensb at users.sourceforge.net
Fri Oct 4 04:52:52 CEST 2002
Update of /cvsroot/koha/koha/acqui.simple
In directory usw-pr-cvs1:/tmp/cvs-serv26123
Modified Files:
Tag: arensb-context
marcimport.pl
Log Message:
Use C4::Connect instead of C4::Database, C4::Connect->dbh instead
C4Connect.
Removed old code for reading /etc/koha.conf.
Index: marcimport.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui.simple/marcimport.pl,v
retrieving revision 1.13
retrieving revision 1.13.2.1
diff -C2 -r1.13 -r1.13.2.1
*** marcimport.pl 14 Aug 2002 18:12:52 -0000 1.13
--- marcimport.pl 4 Oct 2002 02:52:50 -0000 1.13.2.1
***************
*** 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,1002 ----
#---------------
# $Log$
+ # 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
More information about the Koha-cvs
mailing list