From a3ff0479442e395a605a2da48eb4c27f44ba6cb0 Mon Sep 17 00:00:00 2001 From: kados Date: Mon, 27 Feb 2006 01:10:14 +0000 Subject: [PATCH] use new Context->Zconn object --- C4/SearchMarc.pm | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/C4/SearchMarc.pm b/C4/SearchMarc.pm index 9a73930a31..0758cae716 100644 --- a/C4/SearchMarc.pm +++ b/C4/SearchMarc.pm @@ -235,14 +235,8 @@ sub catalogsearch { # warn "$i : ".@$tags[$i]. "=> $tag / $subfield = ".$tagslib->{$tag}->{$subfield}->{kohafield}; } warn "QUERY : $query"; - my $Zconn; - eval { - $Zconn = new ZOOM::Connection(C4::Context->config("zebradb")); - }; - $Zconn->option(cqlfile => C4::Context->config("intranetdir")."/zebra/pqf.properties"); - $Zconn->option(preferredRecordSyntax => "xml"); + my $Zconn = C4::Context->Zconn or die "unable to set Zconn"; my $q = new ZOOM::Query::CQL2RPN( $query, $Zconn); -# warn "ERROR : ".$Zconn->errcode(); my $rs = $Zconn->search($q); my $numresults=$rs->size(); if ($numresults eq 0) { -- 2.39.5