Update of /cvsroot/koha/koha/C4 In directory usw-pr-cvs1:/tmp/cvs-serv17101 Modified Files: Catalogue.pm Log Message: Minor cleanups. Needs testing. Starting to think about modifying updatebiblio.pl to use this API. Index: Catalogue.pm =================================================================== RCS file: /cvsroot/koha/koha/C4/Catalogue.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** Catalogue.pm 2001/10/05 20:13:20 1.9 --- Catalogue.pm 2001/11/03 07:29:36 1.10 *************** *** 3,6 **** --- 3,11 ---- # Continue working on updateItem!!!!!! # + # updateItem is looking not bad. Need to add addSubfield and deleteSubfield + # functions + # + # Trying to track down $dbh's that aren't disconnected.... + # *************** *** 155,158 **** --- 160,164 ---- } } + $dbh->disconnect; return($Subfield_ID, $Subfield_Key); } *************** *** 167,172 **** # to the existing record and _LOG ALL CHANGES MADE_ in some way. I'd like for # this logging feature to be usable to undo changes easily. - # - # Need to add support for bibliosubject, additionalauthors, bibliosubtitle tables my ($env, $biblio) = @_; --- 173,176 ---- *************** *** 176,180 **** $sth->execute; my $origbiblio=$sth->fetchrow_hashref; ! $sth=$dbh->prepare("select subtitle from bibliosubtitle where biblionumber=$biblionumber"): $sth->execute; my ($subtitle)=$sth->fetchrow; --- 180,184 ---- $sth->execute; my $origbiblio=$sth->fetchrow_hashref; ! $sth=$dbh->prepare("select subtitle from bibliosubtitle where biblionumber=$biblionumber"); $sth->execute; my ($subtitle)=$sth->fetchrow; *************** *** 185,189 **** while (my ($author) = $sth->fetchrow) { push (@{$origbiblio->{'additionalauthors'}}, $author); ! $origadditionalauthors->{$subject}=1; } $sth=$dbh->prepare("select subject from bibliosubjects where biblionumber=$biblionumber"); --- 189,193 ---- while (my ($author) = $sth->fetchrow) { push (@{$origbiblio->{'additionalauthors'}}, $author); ! $origadditionalauthors->{$author}=1; } $sth=$dbh->prepare("select subject from bibliosubjects where biblionumber=$biblionumber"); *************** *** 283,286 **** --- 287,291 ---- my $newsubject=''; + my $subjects; foreach $newsubject (@{$biblio->{'subject'}}) { $subjects->{$newsubject}=1; *************** *** 303,306 **** --- 308,312 ---- } } + my $origsubject; foreach $origsubject (keys %$origsubjects) { if ($subjects->{$origsubject} == 1) { *************** *** 312,315 **** --- 318,322 ---- } + $dbh->disconnect; } *************** *** 323,329 **** my $original=shift; my $new=shift; ! print "KOHA: $section $item $original $new\n"; } elsif ($database eq 'marc') { my $type=shift; my $tag=shift; my $mark=shift; --- 330,337 ---- my $original=shift; my $new=shift; ! print "KOHA: $type $section $item $original $new\n"; } elsif ($database eq 'marc') { my $type=shift; + my $Record_ID=shift; my $tag=shift; my $mark=shift; *************** *** 331,335 **** my $original=shift; my $new=shift; ! print "MARC: $tag $mark $subfield_ID $original $new\n"; } } --- 339,343 ---- my $original=shift; my $new=shift; ! print "MARC: $type $Record_ID $tag $mark $subfield_ID $original $new\n"; } } *************** *** 770,773 **** --- 778,783 ---- changeSubfield($Record_ID, '010', 'a', $obi->{'lccn'}, $biblioitem->{'lccn'}); } + $sth->finish; + $dbh->disconnect; } *************** *** 1015,1018 **** --- 1025,1030 ---- } } + $sth->finish; + $dbh->disconnect; }
participants (1)
-
Steve Tonnesen