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.15,1.16


From: Andrew Arensburger
Subject: [Koha-cvs] CVS: koha/acqui.simple marcimport.pl,1.15,1.16
Date: Fri, 11 Oct 2002 05:45:12 -0700

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

Modified Files:
        marcimport.pl 
Log Message:
Replaced &requireDBI with C4::Context->dbh, thus making the "use
Fixed muffed quotes in &gettemplate calls.
Added a temporary print statement in &z3950menu, so it'll print
something instead of giving a browser error.


Index: marcimport.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui.simple/marcimport.pl,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** marcimport.pl       9 Oct 2002 18:09:16 -0000       1.15
--- marcimport.pl       11 Oct 2002 12:45:10 -0000      1.16
***************
*** 125,129 ****
      # Input params
      my (
!       $dbh,
        $input,
      )address@hidden;
--- 125,129 ----
      # Input params
      my (
!       $dbh,           # FIXME - Unused argument
        $input,
      )address@hidden;
***************
*** 137,141 ****
      my $debug=0;
  
!     requireDBI($dbh,"ProcessFile");
  
      # See if a particular result item was specified
--- 137,141 ----
      my $debug=0;
  
!     $dbh = C4::Context->dbh;
  
      # See if a particular result item was specified
***************
*** 173,176 ****
--- 173,177 ----
      my $file=MARC::File::USMARC->indata ($data);
      my $oldkoha;
+     # FIXME - This "==" should be "=", right?
      for (my $i==1;$i<$numrecord;$i++) {
        $record = $file->next;
***************
*** 179,183 ****
        $oldkoha=MARCmarc2koha($dbh,$record);
      }
!     my $template=gettemplate('marcimport/marcimportdetail.tmpl";
      $oldkoha->{additionalauthors} =~ s/ \| /\n/g;
      $oldkoha =~ s/\|/\n/g;
--- 180,184 ----
        $oldkoha=MARCmarc2koha($dbh,$record);
      }
!     my $template=gettemplate('marcimport/marcimportdetail.tmpl');
      $oldkoha->{additionalauthors} =~ s/ \| /\n/g;
      $oldkoha =~ s/\|/\n/g;
***************
*** 224,228 ****
      # Input parameters
      my (
!       $dbh,
        $input,
      )address@hidden;
--- 225,229 ----
      # Input parameters
      my (
!       $dbh,           # FIXME - Unused argument
        $input,
      )address@hidden;
***************
*** 244,250 ****
                # FIXME - there's already a $data a few lines above.
      
!     requireDBI($dbh,"ListFileRecords");
  
!     my $template=gettemplate('marcimport/ListFileRecords.tmpl";
  
      # File can be z3950 search query or uploaded MARC data
--- 245,251 ----
                # FIXME - there's already a $data a few lines above.
      
!     $dbh = C4::Context->dbh;
  
!     my $template=gettemplate('marcimport/ListFileRecords.tmpl');
  
      # File can be z3950 search query or uploaded MARC data
***************
*** 283,287 ****
                if ( $server ) {
                        my 
$srvname=&z3950servername($dbh,$srvid,"$server/$database");
!                       $template->parram(srvid => $srvid);
                        $template->param(srvname => $srvname);
                } # if $server
--- 284,288 ----
                if ( $server ) {
                        my 
$srvname=&z3950servername($dbh,$srvid,"$server/$database");
!                       $template->param(srvid => $srvid);
                        $template->param(srvname => $srvname);
                } # if $server
***************
*** 374,377 ****
--- 375,379 ----
      use strict;
      my ($dbh,$oldkoha,$resultsid, $num)address@hidden;        # input
+               # FIXME - $dbh as argument is no longer used
      my (
        $sth,
***************
*** 382,386 ****
        );
      my %row = ();
!     requireDBI($dbh,"PrintResultRecordLink");
  
  #    $bib=extractmarcfields($record);
--- 384,389 ----
        );
      my %row = ();
! 
!     $dbh = C4::Context->dbh;
  
  #    $bib=extractmarcfields($record);
***************
*** 425,429 ****
      use strict;
      my (
!       $dbh,
        $input,
      )address@hidden;
--- 428,432 ----
      use strict;
      my (
!       $dbh,                   # FIXME - Unused argument
        $input,
      )address@hidden;
***************
*** 442,446 ****
      );
  
!     requireDBI($dbh,"z3950menu");
  
      print "<a href=$ENV{'SCRIPT_NAME'}>Main Menu</a><hr>\n";
--- 445,459 ----
      );
  
!     $dbh = C4::Context->dbh;
! 
!     # FIXME - This print statement doesn't belong here. It's just here
!     # so the script will display SOMEthing. But this section really
!     # ought to be properly templated.
!     print <<EOT;
! Content-Type: text/html;
! 
! <HTML>
! <BODY>
! EOT
  
      print "<a href=$ENV{'SCRIPT_NAME'}>Main Menu</a><hr>\n";
***************
*** 571,579 ****
  sub uploadmarc {
      use strict;
!     my ($dbh)address@hidden;
  
!     requireDBI($dbh,"uploadmarc");
  
!     my $template=gettemplate('marcimport/uploadmarc.tmpl";
      $template->param(SCRIPT_NAME => $ENV{'SCRIPT_NAME'});
  #    print "<a href=$ENV{'SCRIPT_NAME'}>Main Menu</a><hr>\n";
--- 584,592 ----
  sub uploadmarc {
      use strict;
!     my ($dbh)address@hidden;          # FIXME - Unused argument
  
!     $dbh = C4::Context->dbh;
  
!     my $template=gettemplate('marcimport/uploadmarc.tmpl');
      $template->param(SCRIPT_NAME => $ENV{'SCRIPT_NAME'});
  #    print "<a href=$ENV{'SCRIPT_NAME'}>Main Menu</a><hr>\n";
***************
*** 599,603 ****
  
  sub mainmenu {
!       my $template=gettemplate('marcimport/mainmenu.tmpl";
        $template->param(SCRIPT_NAME => $ENV{'SCRIPT_NAME'});
        print "Content-Type: text/html\n\n", $template->output;
--- 612,616 ----
  
  sub mainmenu {
!       my $template=gettemplate('marcimport/mainmenu.tmpl');
        $template->param(SCRIPT_NAME => $ENV{'SCRIPT_NAME'});
        print "Content-Type: text/html\n\n", $template->output;
***************
*** 612,615 ****
--- 625,629 ----
      my (
        $dbh,           # DBI handle
+                       # FIXME - Unused argument
        $input,         # CGI parms
      )address@hidden;
***************
*** 618,622 ****
      my $error;
  
!     requireDBI($dbh,"AcceptZ3950Queue");
  
      my $query=$input->param('query');
--- 632,636 ----
      my $error;
  
!     $dbh = C4::Context->dbh;
  
      my $query=$input->param('query');
***************
*** 677,684 ****
      my (
        $dbh,           # DBI handle
        $input,         # CGI parms
      )address@hidden;
  
!     requireDBI($dbh,"AcceptMarcUpload");
  
      my $name=$input->param('name');
--- 691,699 ----
      my (
        $dbh,           # DBI handle
+                       # FIXME - Unused argument
        $input,         # CGI parms
      )address@hidden;
  
!     $dbh = C4::Context->dbh;
  
      my $name=$input->param('name');
***************
*** 704,708 ****
      use strict;
      my (
!       $dbh,
        $input,
      )address@hidden;
--- 719,723 ----
      use strict;
      my (
!       $dbh,                   # FIXME - Unused argument
        $input,
      )address@hidden;
***************
*** 713,717 ****
      my $record;
  
!     requireDBI($dbh,"AcceptBiblioitem");
  
  #    my $isbn=$input->param('isbn');
--- 728,732 ----
      my $record;
  
!     $dbh = C4::Context->dbh;
  
  #    my $isbn=$input->param('isbn');
***************
*** 738,745 ****
        print "Error in marcimport.pl/Acceptbiblioitem : numrecord not defined 
: contact administrator\n";
      }
!     my $template=gettemplate('marcimport/AcceptBiblioitem.tmpl";
  
      my $oldkoha = MARCmarc2koha($dbh,$record);
      # See if it already exists
      my $sth=$dbh->prepare("select biblionumber,biblioitemnumber 
        from biblioitems 
--- 753,761 ----
        print "Error in marcimport.pl/Acceptbiblioitem : numrecord not defined 
: contact administrator\n";
      }
!     my $template=gettemplate('marcimport/AcceptBiblioitem.tmpl');
  
      my $oldkoha = MARCmarc2koha($dbh,$record);
      # See if it already exists
+     # FIXME - There's already a $sth in this context.
      my $sth=$dbh->prepare("select biblionumber,biblioitemnumber 
        from biblioitems 
***************
*** 841,850 ****
      use strict;
      my ( $dbh, $input )address@hidden;
  
!     my $template=gettemplate('marcimport/AcceptItemCopy.tmpl";
  
      my $error;
  
!     requireDBI($dbh,"AcceptItemCopy");
  
      my $barcode=$input->param('barcode');
--- 857,867 ----
      use strict;
      my ( $dbh, $input )address@hidden;
+                       # FIXME - $dbh argument unused
  
!     my $template=gettemplate('marcimport/AcceptItemCopy.tmpl');
  
      my $error;
  
!     $dbh = C4::Context->dbh;
  
      my $barcode=$input->param('barcode');
***************
*** 982,985 ****
--- 999,1008 ----
  #---------------
  # $Log$
+ # Revision 1.16  2002/10/11 12:45:10  arensb
+ # Replaced &requireDBI with C4::Context->dbh, thus making the "use
+ # Fixed muffed quotes in &gettemplate calls.
+ # Added a temporary print statement in &z3950menu, so it'll print
+ # something instead of giving a browser error.
+ #
  # Revision 1.15  2002/10/09 18:09:16  tonnesen
  # switched from picktemplate() to gettemplate()




reply via email to

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