[Koha-cvs] koha/C4 Context.pm

Tumer Garip tgarip at neu.edu.tr
Sun May 14 02:22:31 CEST 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch: 	
Changes by:	Tumer Garip <tgarip1957 at savannah.gnu.org>	06/05/14 00:22:31

Modified files:
	C4             : Context.pm 

Log message:
	Adding support for getting details of different zebra servers

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/C4/Context.pm.diff?tr1=1.37&tr2=1.38&r1=text&r2=text

Patches:
Index: koha/C4/Context.pm
diff -u koha/C4/Context.pm:1.37 koha/C4/Context.pm:1.38
--- koha/C4/Context.pm:1.37	Sat May 13 19:51:39 2006
+++ koha/C4/Context.pm	Sun May 14 00:22:31 2006
@@ -15,7 +15,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.37 2006/05/13 19:51:39 tgarip1957 Exp $
+# $Id: Context.pm,v 1.38 2006/05/14 00:22:31 tgarip1957 Exp $
 package C4::Context;
 use strict;
 use DBI;
@@ -25,7 +25,7 @@
 	qw($context),
 	qw(@context_stack);
 
-$VERSION = do { my @v = '$Revision: 1.37 $' =~ /\d+/g;
+$VERSION = do { my @v = '$Revision: 1.38 $' =~ /\d+/g;
 		shift(@v) . "." . join("_", map {sprintf "%03d", $_ } @v); };
 
 =head1 NAME
@@ -311,7 +311,22 @@
 	# 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 @@
 
 =cut
 # $Log: Context.pm,v $
+# 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.





More information about the Koha-cvs mailing list