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

(-)a/C4/Context.pm (+1 lines)
Lines 939-944 Gets various version info, for core Koha packages, Currently called from carp ha Link Here
939
# A little example sub to show more debugging info for CGI::Carp
939
# A little example sub to show more debugging info for CGI::Carp
940
sub get_versions {
940
sub get_versions {
941
    my %versions;
941
    my %versions;
942
    $versions{supportedVersions} = Koha::current_versions();
942
    $versions{kohaVersion}  = Koha::version();
943
    $versions{kohaVersion}  = Koha::version();
943
    $versions{kohaDbVersion} = C4::Context->preference('version');
944
    $versions{kohaDbVersion} = C4::Context->preference('version');
944
    $versions{osVersion} = join(" ", POSIX::uname());
945
    $versions{osVersion} = join(" ", POSIX::uname());
(-)a/Koha.pm (+14 lines)
Lines 19-24 package Koha; Link Here
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use WWW::Mechanize;
22
23
23
use vars qw{ $VERSION };
24
use vars qw{ $VERSION };
24
25
Lines 35-40 sub version { Link Here
35
    return $VERSION;
36
    return $VERSION;
36
}
37
}
37
38
39
sub current_versions {
40
    my $mechanical_scrapper = WWW::Mechanize->new();
41
    my @links;
42
    eval {
43
        $mechanical_scrapper->get('http://download.koha-community.org/');
44
        @links = $mechanical_scrapper->links();
45
    };
46
    my @urls_only = map { $_->url } @links;
47
    my @versions = grep { if ($_ =~ /(koha-)([.0-9]*)(.tar.gz)$/) { $_ = $2; } } @urls_only;
48
    my @sorted_versions = sort { $b cmp $a } @versions;
49
    return \@sorted_versions;
50
}
51
38
1;
52
1;
39
53
40
=head1 NAME
54
=head1 NAME
(-)a/about.pl (+1 lines)
Lines 447-452 $template->param( 'bad_yaml_prefs' => \@bad_yaml_prefs ) if @bad_yaml_prefs; Link Here
447
my %versions = C4::Context::get_versions();
447
my %versions = C4::Context::get_versions();
448
448
449
$template->param(
449
$template->param(
450
    supportedVersions => $versions{'supportedVersions'},
450
    kohaVersion   => $versions{'kohaVersion'},
451
    kohaVersion   => $versions{'kohaVersion'},
451
    osVersion     => $versions{'osVersion'},
452
    osVersion     => $versions{'osVersion'},
452
    perlPath      => $perl_path,
453
    perlPath      => $perl_path,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt (-2 / +8 lines)
Lines 34-40 Link Here
34
34
35
        <table>
35
        <table>
36
            <caption>Server information</caption>
36
            <caption>Server information</caption>
37
            <tr><th scope="row">Koha version: </th><td>[% kohaVersion | html %]</td></tr>
37
            <tr><th scope="row">Koha version: </th><td>[% kohaVersion | html %]<br />
38
                <br />
39
                <strong>Currently Supported Versions</strong><br />
40
                [% FOREACH supportedVersion IN supportedVersions %]
41
                    [% supportedVersion | html %]<br />
42
                [% END %]
43
                [% IF supportedVersions.size < 1 %]Unknown[% END %]
44
                </td></tr>
38
            <tr><th scope="row">OS version ('uname -a'): </th><td>[% osVersion | html %]</td></tr>
45
            <tr><th scope="row">OS version ('uname -a'): </th><td>[% osVersion | html %]</td></tr>
39
            <tr><th scope="row">Perl interpreter: </th><td>[% perlPath | html %]</td></tr>
46
            <tr><th scope="row">Perl interpreter: </th><td>[% perlPath | html %]</td></tr>
40
            <tr><th scope="row">Perl version: </th><td>[% perlVersion | html %]</td></tr>
47
            <tr><th scope="row">Perl version: </th><td>[% perlVersion | html %]</td></tr>
41
- 

Return to bug 16349