From a96d6fd5a9348a473c01cabf4ff540db70ba1e7a Mon Sep 17 00:00:00 2001 From: tgarip1957 Date: Sun, 14 May 2006 00:22:31 +0000 Subject: [PATCH] Adding support for getting details of different zebra servers --- C4/Context.pm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/C4/Context.pm b/C4/Context.pm index 9b0874779f..39b9ee61c0 100644 --- a/C4/Context.pm +++ b/C4/Context.pm @@ -311,7 +311,22 @@ sub config # Return the value of the requested config variable return $context->{"config"}->{$var}; } +=item zebraconfig +$serverdir=C4::Context->zebraconfig("biblioserver")->{directory}; +returns the zebra server specific details for different zebra servers +similar to C4:Context->config +=cut + +sub zebraconfig +{ + my $self = shift; + my $var = shift; # The config variable to return + + return undef if !defined($context->{"server"}); + # Return the value of the requested config variable + return $context->{"server"}->{$var}; +} =item preference $sys_preference = C4::Context->preference("some_variable"); @@ -810,6 +825,9 @@ Andrew Arensburger =cut # $Log$ +# Revision 1.38 2006/05/14 00:22:31 tgarip1957 +# Adding support for getting details of different zebra servers +# # Revision 1.37 2006/05/13 19:51:39 tgarip1957 # Now reads koha.xml rather than koha.conf. # koha.xml contains both the koha configuration and zebraserver configuration. -- 2.39.5