[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/C4 Biblio.pm,1.68,1.69
From: |
Paul POULAIN |
Subject: |
[Koha-cvs] CVS: koha/C4 Biblio.pm,1.68,1.69 |
Date: |
Mon, 24 Nov 2003 05:27:19 -0800 |
Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1:/tmp/cvs-serv18177/C4
Modified Files:
Biblio.pm
Log Message:
fix for #380 (bibliosubject)
Index: Biblio.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Biblio.pm,v
retrieving revision 1.68
retrieving revision 1.69
diff -C2 -r1.68 -r1.69
*** Biblio.pm 6 Nov 2003 17:18:30 -0000 1.68
--- Biblio.pm 24 Nov 2003 13:27:17 -0000 1.69
***************
*** 2,5 ****
--- 2,8 ----
# $Id$
# $Log$
+ # Revision 1.69 2003/11/24 13:27:17 tipaul
+ # fix for #380 (bibliosubject)
+ #
# Revision 1.68 2003/11/06 17:18:30 tipaul
# bugfix for #384
***************
*** 1293,1304 ****
($tagfield,$tagsubfield) =
MARCfind_marc_from_kohafield($dbh,"bibliosubject.subject");
my @subj = $record->field($tagfield);
foreach my $subject (@subj) {
my @subjsubfield = $subject->subfield($tagsubfield);
- my @subjects;
foreach my $subfieldcount (0..$#subjsubfield) {
push @subjects,$subjsubfield[$subfieldcount];
}
- OLDmodsubject($dbh,$oldbibnum,1,@subjects);
}
# we must add bibnum and bibitemnum in MARC::Record...
# we build the new field with biblionumber and biblioitemnumber
--- 1296,1307 ----
($tagfield,$tagsubfield) =
MARCfind_marc_from_kohafield($dbh,"bibliosubject.subject");
my @subj = $record->field($tagfield);
+ my @subjects;
foreach my $subject (@subj) {
my @subjsubfield = $subject->subfield($tagsubfield);
foreach my $subfieldcount (0..$#subjsubfield) {
push @subjects,$subjsubfield[$subfieldcount];
}
}
+ OLDmodsubject($dbh,$oldbibnum,1,@subjects);
# we must add bibnum and bibitemnum in MARC::Record...
# we build the new field with biblionumber and biblioitemnumber
***************
*** 1353,1364 ****
($tagfield,$tagsubfield) =
MARCfind_marc_from_kohafield($dbh,"bibliosubject.subject");
my @subj = $record->field($tagfield);
foreach my $subject (@subj) {
my @subjsubfield = $subject->subfield($tagsubfield);
- my @subjects;
foreach my $subfieldcount (0..$#subjsubfield) {
push @subjects,$subjsubfield[$subfieldcount];
}
- OLDmodsubject($dbh,$oldbiblionumber,1,@subjects);
}
return 1;
}
--- 1356,1367 ----
($tagfield,$tagsubfield) =
MARCfind_marc_from_kohafield($dbh,"bibliosubject.subject");
my @subj = $record->field($tagfield);
+ my @subjects;
foreach my $subject (@subj) {
my @subjsubfield = $subject->subfield($tagsubfield);
foreach my $subfieldcount (0..$#subjsubfield) {
push @subjects,$subjsubfield[$subfieldcount];
}
}
+ OLDmodsubject($dbh,$oldbiblionumber,1,@subjects);
return 1;
}
***************
*** 1554,1558 ****
if (my $data = $sth->fetchrow_hashref) {
} else {
! if ($force eq $subject[$i] || $force eq 1) {
# subject not in aut, chosen to force anway
# so insert into cataloguentry so its in auth
file
--- 1557,1561 ----
if (my $data = $sth->fetchrow_hashref) {
} else {
! if ($force eq $subject[$i] || $force == 1) {
# subject not in aut, chosen to force anway
# so insert into cataloguentry so its in auth
file
***************
*** 1581,1589 ****
$sth->execute;
$sth->finish;
! for (my $i = 0; $i < $count; $i++) {
! $sth = $dbh->prepare("Insert into bibliosubject values
('$subject[$i]', $bibnum)");
! $sth->execute;
! $sth->finish;
! } # for
} # if
--- 1584,1592 ----
$sth->execute;
$sth->finish;
! $sth = $dbh->prepare("Insert into bibliosubject values (?,?)");
! foreach $query (@subject) {
! $sth->execute($query,$bibnum);
! } # foreach
! $sth->finish;
} # if
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/C4 Biblio.pm,1.68,1.69,
Paul POULAIN <=