From 94700d65c09fc920f30d2bd9763737065635e68a Mon Sep 17 00:00:00 2001 From: =?utf8?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 Signed-off-by: Ian Walls --- C4/AuthoritiesMarc.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index e206d25542..0164c8daa3 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 -- 2.39.5