[Koha-cvs] CVS: koha/C4 Catalogue.pm,1.19,1.20 Biblio.pm,1.2,1.3

Paul POULAIN tipaul at users.sourceforge.net
Thu Jul 4 17:53:04 CEST 2002


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

Modified Files:
	Catalogue.pm Biblio.pm 
Log Message:
Long is the road to MARC..

Not related to MARC :
* removed HLT- empty link when no basket for a supplier (should be useful to copy this into rel-1-2 i think)
* fixed some "use of uninitialized value"
related to MARC
* changed use Acquisition to use Catalogue, new package for MARC management

For instance, nothing is done to MARC DB, but structure is modified (see Biblio.pm for details), and everything seems to work : it's still possible to use acqui, and it fills old-DB pretty good.

WARNING : if you work on main trunk, please note Acquisition.pm is NO MORE USED in /acqui/ system. Every sub in Acquisition.pm has been moved to Biblio.pm or Catalogue.pm.



Index: Catalogue.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Catalogue.pm,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** Catalogue.pm	14 Jun 2002 16:47:33 -0000	1.19
--- Catalogue.pm	4 Jul 2002 15:53:02 -0000	1.20
***************
*** 29,33 ****
  	     &ordersearch
  	     &modorder &getsingleorder &invoice &receiveorder
! 	     &updaterecorder
  
  	     &bookfunds &bookfundbreakdown &updatecost 
--- 29,33 ----
  	     &ordersearch
  	     &modorder &getsingleorder &invoice &receiveorder
! 	     &updaterecorder &newordernum 
  
  	     &bookfunds &bookfundbreakdown &updatecost 

Index: Biblio.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Biblio.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** Biblio.pm	20 Jun 2002 21:07:30 -0000	1.2
--- Biblio.pm	4 Jul 2002 15:53:02 -0000	1.3
***************
*** 53,57 ****
  	     &itemcount &newbiblio &newbiblioitem 
  	     &modnote &newsubject &newsubtitle
! 	     &newordernum &modbiblio &checkitems
  	     &newitems &modbibitem
  	     &modsubtitle &modsubject &modaddauthor &moditem &countitems 
--- 53,57 ----
  	     &itemcount &newbiblio &newbiblioitem 
  	     &modnote &newsubject &newsubtitle
! 	     &modbiblio &checkitems
  	     &newitems &modbibitem
  	     &modsubtitle &modsubject &modaddauthor &moditem &countitems 
***************
*** 201,205 ****
  	$sth->execute;
  	my ($res)=$sth->fetchrow;
! 	my $sth=$dbh->prepare("insert into marc_subfield_table (bibid,tag,tagorder,subfieldcode,subfieldorder,valuebloblink) values (?,?,?,?,?,?)");
  	$sth->execute($bibid,$tagid,$tagorder,$subfieldcode,$subfieldorder,$res);
  	$dbh->do("unlock tables");
--- 201,205 ----
  	$sth->execute;
  	my ($res)=$sth->fetchrow;
! 	$sth=$dbh->prepare("insert into marc_subfield_table (bibid,tag,tagorder,subfieldcode,subfieldorder,valuebloblink) values (?,?,?,?,?,?)");
  	$sth->execute($bibid,$tagid,$tagorder,$subfieldcode,$subfieldorder,$res);
  	$dbh->do("unlock tables");
***************
*** 364,368 ****
      $sth=$dbh->prepare("select bibid,tag,tagorder,subfieldcode,subfieldid,subfieldorder from marc_subfield_table where subfieldid=?");
      $sth->execute($subfieldid);
!     my ($bibid,$tagid,$tagorder,$subfieldcode,$subfieldid,$subfieldorder) = $sth->fetchrow;
      &MARCdelword($dbh,$bibid,$tagid,$tagorder,$subfieldcode,$subfieldorder);
      &MARCaddword($dbh,$bibid,$tagid,$tagorder,$subfieldcode,$subfieldorder,$subfieldvalue);
--- 364,369 ----
      $sth=$dbh->prepare("select bibid,tag,tagorder,subfieldcode,subfieldid,subfieldorder from marc_subfield_table where subfieldid=?");
      $sth->execute($subfieldid);
!     my ($bibid,$tagid,$tagorder,$subfieldcode,$x,$subfieldorder) = $sth->fetchrow;
!     $subfieldid=$x;
      &MARCdelword($dbh,$bibid,$tagid,$tagorder,$subfieldcode,$subfieldorder);
      &MARCaddword($dbh,$bibid,$tagid,$tagorder,$subfieldcode,$subfieldorder,$subfieldvalue);
***************
*** 459,465 ****
      my ($dbh,$bibid,$tag,$tagorder,$subfield,$subfieldorder) = @_;
  #    my $dbh=&C4Connect;
!     my $dbh->do("delete from marc_subfield_table where bibid='$bibid' and
  			tag='$tag' and tagorder='$tagorder' 
! 			and subfieldcode='$subfield'and subfieldorder='$subfieldorder
  			");
  }
--- 460,466 ----
      my ($dbh,$bibid,$tag,$tagorder,$subfield,$subfieldorder) = @_;
  #    my $dbh=&C4Connect;
!     $dbh->do("delete from marc_subfield_table where bibid='$bibid' and
  			tag='$tag' and tagorder='$tagorder' 
! 			and subfieldcode='$subfield' and subfieldorder='$subfieldorder
  			");
  }
***************
*** 972,976 ****
    my $data;
    my $itemnumber;
!   my $error;
  
    $sth->execute;
--- 973,977 ----
    my $data;
    my $itemnumber;
!   my $error = "";
  
    $sth->execute;
***************
*** 1007,1013 ****
      $sth = $dbh->prepare($query);
      $sth->execute;
! 
!     $error .= $sth->errstr;
! 
      $sth->finish;
      $itemnumber++;
--- 1008,1014 ----
      $sth = $dbh->prepare($query);
      $sth->execute;
!     if (defined $sth->errstr) {
! 	$error .= $sth->errstr;
!     }
      $sth->finish;
      $itemnumber++;
***************
*** 1346,1350 ****
      # || die "Cannot execute $query\n" . $sth->errstr;
    while (my $data = $sth->fetchrow_hashref) {
!     @results[$count] = $data;
      $count++;
    } # while
--- 1347,1351 ----
      # || die "Cannot execute $query\n" . $sth->errstr;
    while (my $data = $sth->fetchrow_hashref) {
!     $results[$count] = $data;
      $count++;
    } # while





More information about the Koha-cvs mailing list