[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/C4 Biblio.pm,1.70,1.71
From: |
Paul POULAIN |
Subject: |
[Koha-cvs] CVS: koha/C4 Biblio.pm,1.70,1.71 |
Date: |
Mon, 24 Nov 2003 08:28:52 -0800 |
Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1:/tmp/cvs-serv23449/C4
Modified Files:
Biblio.pm
Log Message:
biblio & item deletion now works fine in MARC editor.
Stores deleted biblio/item in the marc field of the deletedbiblio/deleteditem
table.
Index: Biblio.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Biblio.pm,v
retrieving revision 1.70
retrieving revision 1.71
diff -C2 -r1.70 -r1.71
*** Biblio.pm 24 Nov 2003 13:29:55 -0000 1.70
--- Biblio.pm 24 Nov 2003 16:28:49 -0000 1.71
***************
*** 55,59 ****
&NEWnewbiblio &NEWnewitem
&NEWmodbiblio &NEWmoditem
! &NEWdelbiblio
&MARCaddbiblio &MARCadditem
--- 55,59 ----
&NEWnewbiblio &NEWnewitem
&NEWmodbiblio &NEWmoditem
! &NEWdelbiblio &NEWdelitem
&MARCaddbiblio &MARCadditem
***************
*** 539,542 ****
--- 539,559 ----
}
}
+
+ sub MARCdelitem {
+ # delete the item passed in parameter in MARC tables.
+ my ($dbh,$bibid,$itemnumber)address@hidden;
+ # my $record = MARC::Record->new();
+ # search MARC tagorder
+ my $record = MARCgetitem($dbh,$bibid,$itemnumber);
+ my $copy2deleted=$dbh->prepare("update deleteditems set marc=? where
itemnumber=?");
+ $copy2deleted->execute($record->as_usmarc(),$itemnumber);
+
+ my $sth2 = $dbh->prepare("select tagorder from
marc_subfield_table,marc_subfield_structure where
marc_subfield_table.tag=marc_subfield_structure.tagfield and
marc_subfield_table.subfieldcode=marc_subfield_structure.tagsubfield and
bibid=? and kohafield='items.itemnumber' and subfieldvalue=?");
+ $sth2->execute($bibid,$itemnumber);
+ my ($tagorder) = $sth2->fetchrow_array();
+ my $sth=$dbh->prepare("delete from marc_subfield_table where bibid=?
and tagorder=?");
+ $sth->execute($bibid,$tagorder);
+ }
+
sub MARCmoditem {
my ($dbh,$record,$bibid,$itemnumber,$delete)address@hidden;
***************
*** 1091,1094 ****
--- 1108,1118 ----
}
+ sub NEWdelitem {
+ my ($dbh,$bibid,$itemnumber)address@hidden;
+ my $biblio = &MARCfind_oldbiblionumber_from_MARCbibid($dbh,$bibid);
+ &OLDdelitem($dbh,$itemnumber);
+ &MARCdelitem($dbh,$bibid,$itemnumber);
+ }
+
#
#
***************
*** 1485,1495 ****
my $sth=$dbh->prepare($query);
$sth->execute;
! my @data=$sth->fetchrow_array;
$sth->finish;
! $query="Insert into deleteditems values (";
! foreach my $temp (@data){
! $query .= "'$temp',";
}
! $query=~ s/\,$/\)/;
# print $query;
$sth=$dbh->prepare($query);
--- 1509,1519 ----
my $sth=$dbh->prepare($query);
$sth->execute;
! my $data=$sth->fetchrow_hashref;
$sth->finish;
! $query="Insert into deleteditems set ";
! foreach my $temp (keys %$data){
! $query .= "$temp = ".$dbh->quote($data->{$temp}).",";
}
! $query=~ s/\,$//;
# print $query;
$sth=$dbh->prepare($query);
***************
*** 2186,2189 ****
--- 2210,2217 ----
# $Id$
# $Log$
+ # Revision 1.71 2003/11/24 16:28:49 tipaul
+ # biblio & item deletion now works fine in MARC editor.
+ # Stores deleted biblio/item in the marc field of the
deletedbiblio/deleteditem table.
+ #
# Revision 1.70 2003/11/24 13:29:55 tipaul
# moving $id from beginning to end of file (70 commits... huge comments...)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/C4 Biblio.pm,1.70,1.71,
Paul POULAIN <=
- Prev by Date:
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/fr/acqui.simple addbiblio.tmpl,1.9,1.10 additem.tmpl,1.4,1.5
- Next by Date:
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/fr/search.marc search.tmpl,1.3,1.4
- Previous by thread:
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/fr/acqui.simple addbiblio.tmpl,1.9,1.10 additem.tmpl,1.4,1.5
- Next by thread:
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/fr/search.marc search.tmpl,1.3,1.4
- Index(es):