From d7d4f699a380a5beb57d7532ddfb5422210ae9e1 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Mon, 22 Oct 2007 14:43:18 -0500 Subject: [PATCH] quell warning about C4::Context::DIR being used only once Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- C4/Context.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/C4/Context.pm b/C4/Context.pm index 94f436f15f..876a3f4704 100644 --- a/C4/Context.pm +++ b/C4/Context.pm @@ -145,9 +145,16 @@ $context = undef; # Initially, no context is set sub KOHAVERSION { my $cgidir = C4::Context->intranetdir ."/cgi-bin"; + + # 2 cases here : on CVS install, $cgidir does not need a /cgi-bin + # on a standard install, /cgi-bin need to be added. + # test one, then the other + # FIXME - is this all really necessary? unless (opendir(DIR, "$cgidir/cataloguing/value_builder")) { - $cgidir = C4::Context->intranetdir; + $cgidir = C4::Context->intranetdir; + closedir(DIR); } + do $cgidir."/kohaversion.pl" || die "NO $cgidir/kohaversion.pl"; return kohaversion(); } -- 2.39.5