Browse Source

quell warning about C4::Context::DIR being used only once

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
3.0.x
Galen Charlton 17 years ago
committed by Joshua Ferraro
parent
commit
d7d4f699a3
  1. 9
      C4/Context.pm

9
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();
}

Loading…
Cancel
Save