[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/C4 AuthoritiesMarc.pm
From: |
Joshua Ferraro |
Subject: |
[Koha-cvs] koha/C4 AuthoritiesMarc.pm |
Date: |
Fri, 29 Sep 2006 16:14:25 +0000 |
CVSROOT: /sources/koha
Module name: koha
Changes by: Joshua Ferraro <kados> 06/09/29 16:14:25
Modified files:
C4 : AuthoritiesMarc.pm
Log message:
for some reason this didn't get updated properly, but was committed to
HEAD instead of dev_week.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/AuthoritiesMarc.pm?cvsroot=koha&r1=1.34&r2=1.35
Patches:
Index: AuthoritiesMarc.pm
===================================================================
RCS file: /sources/koha/koha/C4/AuthoritiesMarc.pm,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- AuthoritiesMarc.pm 27 Sep 2006 19:53:52 -0000 1.34
+++ AuthoritiesMarc.pm 29 Sep 2006 16:14:25 -0000 1.35
@@ -121,7 +121,7 @@
$length=10 unless $length;
my @oAuth;
my $i;
- $oAuth[0]=C4::Context->Zconnauth("authorityserver");
+ $oAuth[0]=C4::Context->Zconn("authorityserver",1,1);
my ($mainentry)=MARCfind_attr_from_kohafield("mainentry");
my ($allentry)=MARCfind_attr_from_kohafield("allentry");
@@ -316,23 +316,15 @@
$sth->execute;
($authid)=$sth->fetchrow;
$authid=$authid+1;
- XML_writeline($record,"authid",$authid,"authorities");
-
XML_writeline($record,"authtypecode",$authtypecode,"authorities");
- my $xml=XML_hash2xml($record);
- $dbh->do("lock tables auth_header WRITE");
- $sth=$dbh->prepare("insert into auth_header
(authid,datecreated,authtypecode,marcxml) values (?,now(),?,?)");
- $sth->execute($authid,$authtypecode,$xml);
- $sth->finish;
- }else
+ }
-##Modified record may also come here use UPDATE -- bulk import comes here
- XML_writeline($record,"authid",$authid,"authorities");
- XML_writeline($record,"authtypecode",$authtypecode,"authorities");
- my $xml=XML_hash2xml($record);
- my $sth=$dbh->prepare("UPDATE auth_header set marcxml=?,authtypecode=?
where authid=?");
- $sth->execute($xml,$authtypecode,$authid);
+##Modified record may also come here use REPLACE -- bulk import comes here
+XML_writeline($record,"authid",$authid,"authorities");
+XML_writeline($record,"authtypecode",$authtypecode,"authorities");
+my $xml=XML_hash2xml($record);
+ my $sth=$dbh->prepare("REPLACE auth_header set marcxml=?,
authid=?,authtypecode=?,datecreated=now()");
+ $sth->execute($xml,$authid,$authtypecode);
$sth->finish;
- }
ZEBRAop($dbh,$authid,'specialUpdate',"authorityserver");
## If the record is linked to another update the linked authorities with new
authid
my @linkids=XML_readline_asarray($record,"linkid","authorities");
@@ -746,7 +738,7 @@
if ($update==1){
my
$biblionumber=XML_readline_onerecord($xmlhash,"biblionumber","biblios");
my $frameworkcode=MARCfind_frameworkcode($dbh,$biblionumber);
- NEWmodbiblio($dbh,$biblionumber,$xmlhash,$frameworkcode) ;
+ ModBiblio($dbh,$biblionumber,$xmlhash,$frameworkcode) ;
}
}#foreach $xmlhash
@@ -855,7 +847,7 @@
=cut
-# $Id: AuthoritiesMarc.pm,v 1.34 2006/09/27 19:53:52 tgarip1957 Exp $
+# $Id: AuthoritiesMarc.pm,v 1.35 2006/09/29 16:14:25 kados Exp $
# Revision 1.30 2006/09/06 16:21:03 tgarip1957
# Clean up before final commits
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha/C4 AuthoritiesMarc.pm,
Joshua Ferraro <=