[Koha-bugs] [Bug 13758] New: KOHAVERSION should be statically set
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Feb 24 20:37:42 CET 2015
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13758
Bug ID: 13758
Summary: KOHAVERSION should be statically set
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Architecture, internals, and plumbing
Assignee: gmcharlt at gmail.com
Reporter: tomascohen at gmail.com
QA Contact: testopia at bugs.koha-community.org
Currently, C4::Context::KOHAVERSION calculates the version number by running
kohaversion.pl on a new Perl interpreter:
sub KOHAVERSION {
my $cgidir = C4::Context->intranetdir;
# Apparently the GIT code does not run out of a CGI-BIN subdirectory
# but distribution code does? (Stan, 1jan08)
if(-d $cgidir . "/cgi-bin"){
my $cgidir .= "/cgi-bin";
}
do $cgidir."/kohaversion.pl" || die "NO $cgidir/kohaversion.pl";
return kohaversion();
}
There's no point on doing this, as it is a hardcoded value we write on each DB
update.
It adds several milliseconds of latency to each request as the version
comparisson is done on each request to detect needed DB updates.
It should be statically set as $VERSION is (hmpf) on C4::Context, and if for
some reason we want to keep kohaversion.pl we should definitely read
C4::Context::VERSION (or KOHAVERSION if we rename it).
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list