View | Details | Raw Unified | Return to bug 13758
Collapse All | Expand All

(-)a/C4/Context.pm (-11 / +5 lines)
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
(-)a/Koha/Version.pm (+47 lines)
Line 0 Link Here
1
package Koha::Version;
2
3
# Copyright 2015 Theke Solutions
4
#
5
# This file is part of Koha.
6
#
7
# Koha is free software; you can redistribute it and/or modify it
8
# under the terms of the GNU General Public License as published by
9
# the Free Software Foundation; either version 3 of the License, or
10
# (at your option) any later version.
11
#
12
# Koha is distributed in the hope that it will be useful, but
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
16
#
17
# You should have received a copy of the GNU General Public License
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
20
use Modern::Perl;
21
22
=head1 NAME
23
24
Koha::Version - A simple package providing the current Koha version
25
26
=head1 SYNOPSIS
27
28
    use Koha::Version;
29
30
    my $version = Koha::Version::VERSION;
31
32
=cut
33
34
use constant VERSION => '3.19.00.016';
35
36
1;
37
38
=head1 SEE ALSO
39
40
C4::Context
41
kohaversion.pl
42
43
=head1 AUTHOR
44
45
Tomas Cohen Arazi <tomascohen@gmail.com>
46
47
=cut
(-)a/Makefile.PL (-2 / +2 lines)
Lines 1133-1140 database to be used by Koha); Link Here
1133
    # add version number
1133
    # add version number
1134
    my $version = "no_version_found";
1134
    my $version = "no_version_found";
1135
    eval {
1135
    eval {
1136
        require 'kohaversion.pl';
1136
        require Koha::Version;
1137
        $version = kohaversion();
1137
        $version = Koha::Version::VERSION;
1138
    };
1138
    };
1139
    $config{'KOHA_INSTALLED_VERSION'} = $version;
1139
    $config{'KOHA_INSTALLED_VERSION'} = $version;
1140
1140
(-)a/kohaversion.pl (-7 / +5 lines)
Lines 14-27 the kohaversion is divided in 4 parts : Link Here
14
14
15
=cut
15
=cut
16
16
17
use strict;
17
use Modern::Perl;
18
use Koha::Version;
18
19
19
sub kohaversion {
20
sub kohaversion {
20
    our $VERSION = '3.19.00.016';
21
21
    # version needs to be set this way
22
    return Koha::Version::VERSION;
22
    # so that it can be picked up by Makefile.PL
23
23
    # during install
24
    return $VERSION;
25
}
24
}
26
25
27
1;
26
1;
28
- 

Return to bug 13758