From 1bc61979276a8f5243de54549195e464c52ee96b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9rick=20Capovilla?= Date: Thu, 10 Feb 2011 10:50:12 -0500 Subject: [PATCH] Bug 5737: Modified the merge subroutine in AuthoritiesMarc.pm so it won't destroy the connection to the biblioserver. Signed-off-by: Chris Cormack --- C4/AuthoritiesMarc.pm | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index fa2ef00..87c620c 100644 --- a/C4/AuthoritiesMarc.pm +++ b/C4/AuthoritiesMarc.pm @@ -1307,6 +1307,7 @@ sub merge { } else { #zebra connection my $oConnection=C4::Context->Zconn("biblioserver",0); + my $oldSyntax = $oConnection->option("preferredRecordSyntax"); $oConnection->option("preferredRecordSyntax"=>"XML"); my $query; $query= "an=".$mergefrom; @@ -1323,7 +1324,8 @@ sub merge { push @reccache, $marcdata; $z++; } - $oConnection->destroy(); + $oResult->destroy(); + $oConnection->option("preferredRecordSyntax"=>$oldSyntax); } #warn scalar(@reccache)." biblios to update"; # Get All candidate Tags for the change -- 1.7.4.1