[Koha-cvs] CVS: koha/acqui.simple bulkmarcimport.pl,1.7,1.8

Andrew Arensburger arensb at users.sourceforge.net
Sat Oct 5 11:56:00 CEST 2002


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

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


Index: bulkmarcimport.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui.simple/bulkmarcimport.pl,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** bulkmarcimport.pl	14 Aug 2002 18:12:52 -0000	1.7
--- bulkmarcimport.pl	5 Oct 2002 09:55:58 -0000	1.8
***************
*** 46,50 ****
  
  
! use C4::Database;
  use CGI;
  use DBI;
--- 46,50 ----
  
  
! use C4::Context;
  use CGI;
  use DBI;
***************
*** 53,57 ****
  use C4::Biblio;
  use C4::Output;
! my $dbh=C4Connect;
  my $userid=$ENV{'REMOTE_USER'};
  %tagtext = (
--- 53,57 ----
  use C4::Biblio;
  use C4::Output;
! my $dbh = C4::Context->dbh;
  my $userid=$ENV{'REMOTE_USER'};
  %tagtext = (
***************
*** 114,118 ****
  
  
- my $dbh=C4Connect;
  if ($file) {
      open (F, "$file");
--- 114,117 ----
***************
*** 144,151 ****
  		my $itemcounter=1;
  		$counter=0;
! 		while ($item=substr($directory,0,12)) {
  		    $tag=substr($directory,0,3);
! 		    $length=substr($directory,3,4);
! 		    $start=substr($directory,7,6);
  		    $directory=substr($directory,12);
  		    $tag{$counter}=$tag;
--- 143,150 ----
  		my $itemcounter=1;
  		$counter=0;
! 		while ($item=substr($directory,0,12)) {	# FIXME - $item never used
  		    $tag=substr($directory,0,3);
! 		    $length=substr($directory,3,4);	# FIXME - Unused
! 		    $start=substr($directory,7,6);	# FIXME - Unused
  		    $directory=substr($directory,12);
  		    $tag{$counter}=$tag;
***************
*** 455,461 ****
  	    my $q_subclass=$dbh->quote($subclass);
  	    my $q_publicationyear=$dbh->quote($publicationyear);
! 	    my $q_publishercode=$dbh->quote($publishercode);
! 	    my $q_volumedate=$dbh->quote($volumedate);
! 	    my $q_volumeddesc=$dbh->quote($volumeddesc);
  	    my $q_illus=$dbh->quote($illustrator);
  	    my $q_pages=$dbh->quote($pages);
--- 454,460 ----
  	    my $q_subclass=$dbh->quote($subclass);
  	    my $q_publicationyear=$dbh->quote($publicationyear);
! 	    my $q_publishercode=$dbh->quote($publishercode);	# FIXME - $publishercode undefined
! 	    my $q_volumedate=$dbh->quote($volumedate);	# FIXME - $volumedate undefined
! 	    my $q_volumeddesc=$dbh->quote($volumeddesc);	# FIXME - $volumeddesc undefined
  	    my $q_illus=$dbh->quote($illustrator);
  	    my $q_pages=$dbh->quote($pages);
***************
*** 496,499 ****
--- 495,499 ----
  	my $q_notes="''";
  	#my $replacementprice=0;
+ 	# FIXME - There's already a $sth in this scope.
  	my $sth=$dbh->prepare("select max(itemnumber) from items");
  	$sth->execute;
***************
*** 521,523 ****
      }
  }
- $dbh->disconnect;
--- 521,522 ----





More information about the Koha-cvs mailing list