From a54fa6ac528deb3fce49cb8b5add6c1275169070 Mon Sep 17 00:00:00 2001 From: genjimoto Date: Wed, 1 Jun 2005 20:43:58 +0000 Subject: [PATCH] patch from Genji (Waylon R.) to update subjects in MARC tables when systempref has MARC=OFF --- C4/Biblio.pm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 47cd2266ee..2f719947da 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -2056,6 +2056,18 @@ sub modsubject { my ( $bibnum, $force, @subject ) = @_; my $dbh = C4::Context->dbh; my $error = &OLDmodsubject( $dbh, $bibnum, $force, @subject ); + if ($error eq ''){ + # When MARC is off, ensures that the MARC biblio table gets updated with new + # subjects, of course, it deletes the biblio in marc, and then recreates. + # This check is to ensure that no MARC data exists to lose. + + if (C4::Context->preference("MARC") eq '0'){ + my $MARCRecord = &MARCkoha2marcBiblio($dbh,$bibnum); + my $bibid = &MARCfind_MARCbibid_from_oldbiblionumber($dbh,$bibnum); + &MARCmodbiblio($dbh,$bibid, $MARCRecord); + } + + } return ($error); } # sub modsubject @@ -2623,6 +2635,9 @@ Paul POULAIN paul.poulain@free.fr # $Id$ # $Log$ +# Revision 1.119 2005/06/01 20:43:58 genjimoto +# patch from Genji (Waylon R.) to update subjects in MARC tables when systempref has MARC=OFF +# # Revision 1.118 2005/05/04 15:40:01 tipaul # synch'ing 2.2 and head # -- 2.39.5