koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha/C4 Context.pm [rel_3_0]


From: Henri-Damien LAURENT
Subject: [Koha-cvs] koha/C4 Context.pm [rel_3_0]
Date: Thu, 12 Oct 2006 21:42:49 +0000

CVSROOT:        /cvsroot/koha
Module name:    koha
Branch:         rel_3_0
Changes by:     Henri-Damien LAURENT <hdl>      06/10/12 21:42:49

Modified files:
        C4             : Context.pm 

Log message:
        Managing multiple zebra connections

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Context.pm?cvsroot=koha&only_with_tag=rel_3_0&r1=1.43.2.3&r2=1.43.2.4

Patches:
Index: Context.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Context.pm,v
retrieving revision 1.43.2.3
retrieving revision 1.43.2.4
diff -u -b -r1.43.2.3 -r1.43.2.4
--- Context.pm  11 Oct 2006 14:27:26 -0000      1.43.2.3
+++ Context.pm  12 Oct 2006 21:42:49 -0000      1.43.2.4
@@ -16,7 +16,7 @@
 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
 # Suite 330, Boston, MA  02111-1307 USA
 
-# $Id: Context.pm,v 1.43.2.3 2006/10/11 14:27:26 tipaul Exp $
+# $Id: Context.pm,v 1.43.2.4 2006/10/12 21:42:49 hdl Exp $
 use strict;
 use DBI;
 use ZOOM;
@@ -28,7 +28,7 @@
        qw($context),
        qw(@context_stack);
 
-$VERSION = do { my @v = '$Revision: 1.43.2.3 $' =~ /\d+/g;
+$VERSION = do { my @v = '$Revision: 1.43.2.4 $' =~ /\d+/g;
                shift(@v) . "." . join("_", map {sprintf "%03d", $_ } @v); };
 
 =head1 NAME
@@ -209,7 +209,7 @@
        return undef if !defined($self->{"config"});
 
        $self->{"dbh"} = undef;         # Database handle
-       $self->{"Zconn"} = undef;       # Zebra Connection
+       $self->{"Zconn"} = undef;       # Zebra Connections
        $self->{"stopwords"} = undef; # stopwords list
        $self->{"marcfromkohafield"} = undef; # the hash with relations between 
koha table fields and MARC field/subfield
        $self->{"userenv"} = undef;             # User env
@@ -421,13 +421,14 @@
        my $auth=shift;
        my $piggyback=shift;
        my $syntax=shift;
-       if ( defined($context->{"Zconn"}) ) {
-               return $context->{"Zconn"};
+
+       if ( defined($context->{"Zconn"}->{$server}) ) {
+               return $context->{"Zconn"}->{$server};
 
        # No connection object or it died. Create one.
        } else { 
-               $context->{"Zconn"} = 
&_new_Zconn($server,$async,$auth,$piggyback,$syntax);
-               return $context->{"Zconn"};
+               $context->{"Zconn"}->{$server} = 
&_new_Zconn($server,$async,$auth,$piggyback,$syntax);
+               return $context->{"Zconn"}->{$server};
        }
 }
 
@@ -457,7 +458,8 @@
        my $user = $context->{"serverinfo"}->{$server}->{"user"};
        my $servername = $context->{"config"}->{$server};
        my $password = $context->{"serverinfo"}->{$server}->{"password"};
-       
+#      warn "serveur : $server";
+#      warn "nom du serveur : $servername";
        retry:
        eval {
                # set options
@@ -841,6 +843,9 @@
 
 =cut
 # $Log: Context.pm,v $
+# Revision 1.43.2.4  2006/10/12 21:42:49  hdl
+# Managing multiple zebra connections
+#
 # Revision 1.43.2.3  2006/10/11 14:27:26  tipaul
 # removing a warning
 #




reply via email to

[Prev in Thread] Current Thread [Next in Thread]