|
Lines 16-23
package C4::Context;
Link Here
|
| 16 |
# with Koha; if not, write to the Free Software Foundation, Inc., |
16 |
# with Koha; if not, write to the Free Software Foundation, Inc., |
| 17 |
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
17 |
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 18 |
|
18 |
|
| 19 |
use strict; |
19 |
use Modern::Perl; |
| 20 |
use warnings; |
20 |
|
| 21 |
use vars qw($VERSION $AUTOLOAD $context @context_stack $servers $memcached $ismemcached); |
21 |
use vars qw($VERSION $AUTOLOAD $context @context_stack $servers $memcached $ismemcached); |
| 22 |
BEGIN { |
22 |
BEGIN { |
| 23 |
if ($ENV{'HTTP_USER_AGENT'}) { |
23 |
if ($ENV{'HTTP_USER_AGENT'}) { |
|
Lines 107-112
use POSIX ();
Link Here
|
| 107 |
use DateTime::TimeZone; |
107 |
use DateTime::TimeZone; |
| 108 |
use Module::Load::Conditional qw(can_load); |
108 |
use Module::Load::Conditional qw(can_load); |
| 109 |
use Carp; |
109 |
use Carp; |
|
|
110 |
use Koha::Version; |
| 110 |
|
111 |
|
| 111 |
=head1 NAME |
112 |
=head1 NAME |
| 112 |
|
113 |
|
|
Lines 211-226
returns the kohaversion stored in kohaversion.pl file
Link Here
|
| 211 |
=cut |
212 |
=cut |
| 212 |
|
213 |
|
| 213 |
sub KOHAVERSION { |
214 |
sub KOHAVERSION { |
| 214 |
my $cgidir = C4::Context->intranetdir; |
|
|
| 215 |
|
215 |
|
| 216 |
# Apparently the GIT code does not run out of a CGI-BIN subdirectory |
216 |
return Koha::Version::VERSION; |
| 217 |
# but distribution code does? (Stan, 1jan08) |
217 |
|
| 218 |
if(-d $cgidir . "/cgi-bin"){ |
|
|
| 219 |
my $cgidir .= "/cgi-bin"; |
| 220 |
} |
| 221 |
|
| 222 |
do $cgidir."/kohaversion.pl" || die "NO $cgidir/kohaversion.pl"; |
| 223 |
return kohaversion(); |
| 224 |
} |
218 |
} |
| 225 |
|
219 |
|
| 226 |
=head2 final_linear_version |
220 |
=head2 final_linear_version |