From 6a5da19c173c03e07c6f5d87356e06b67a0d8af5 Mon Sep 17 00:00:00 2001 From: Joshua Ferraro Date: Tue, 8 Jul 2008 18:19:58 -0500 Subject: [PATCH] Partial apply of a patch from Frederic, this ensures that Context is cached; the remaining syspref cacheing will be delayed until 3.2 as it needs to be paired with an as yet unwritten setter for sysprefs --- C4/Context.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Context.pm b/C4/Context.pm index 3cba0ff3fe..b9084b4858 100644 --- a/C4/Context.pm +++ b/C4/Context.pm @@ -249,11 +249,11 @@ sub db_scheme2dbi { sub import { my $package = shift; my $conf_fname = shift; # Config file name - my $context; + $context; # Create a new context from the given config file name, if # any, then set it as the current context. - $context = new C4::Context($conf_fname); + $context = new C4::Context($conf_fname) unless $context; return undef if !defined($context); $context->set_context; } -- 2.39.5