X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=C4%2FContext.pm;h=a51f5c7c51fd9847447de3f79c350a5ab0758bf7;hb=a4b7df44901311f3a96b4e8f828e105845763dac;hp=42e7aa27a5c06c3aed784bf6dd991b29c4a4646e;hpb=a6c9bd0eb55c32d5632625144775271f20aa15f7;p=koha.git diff --git a/C4/Context.pm b/C4/Context.pm index 42e7aa27a5..a51f5c7c51 100644 --- a/C4/Context.pm +++ b/C4/Context.pm @@ -103,6 +103,7 @@ use ZOOM; use XML::Simple; use C4::Boolean; use C4::Debug; +use Koha; use POSIX (); use DateTime::TimeZone; use Module::Load::Conditional qw(can_load); @@ -204,36 +205,6 @@ $context = undef; # Initially, no context is set @context_stack = (); # Initially, no saved contexts -=head2 KOHAVERSION - -returns the kohaversion stored in kohaversion.pl file - -=cut - -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(); -} - -=head2 final_linear_version - -Returns the version number of the final update to run in updatedatabase.pl. -This number is equal to the version in kohaversion.pl - -=cut - -sub final_linear_version { - return KOHAVERSION; -} - =head2 read_config_file Reads the specified Koha config file. @@ -1199,7 +1170,7 @@ Gets various version info, for core Koha packages, Currently called from carp ha # A little example sub to show more debugging info for CGI::Carp sub get_versions { my %versions; - $versions{kohaVersion} = KOHAVERSION(); + $versions{kohaVersion} = Koha::version(); $versions{kohaDbVersion} = C4::Context->preference('version'); $versions{osVersion} = join(" ", POSIX::uname()); $versions{perlVersion} = $];