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

(-)a/about.pl (-10 / +12 lines)
Lines 51-57 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
51
my $kohaVersion   = C4::Context->preference("Version");
51
my $kohaVersion   = C4::Context->preference("Version");
52
# restore ., for display consistency
52
# restore ., for display consistency
53
$kohaVersion =~ /(.)\.(..)(..)(...)/;
53
$kohaVersion =~ /(.)\.(..)(..)(...)/;
54
$kohaVersion = "$1.$2.$3.$4";
54
# transform digits to Perl number, to display 3.6.1.2 instead of 3.06.01.002
55
$kohaVersion = ($1+0).".".($2+0).".".($3+0).".".($4+0);
56
57
my $dbrev_applied=""; # the list of database revisions
58
55
# the $kohaVersion is duplicated since 3.7: the 3.6 (that uses the old mechanism) and the 3.7 (new mechanism).
59
# the $kohaVersion is duplicated since 3.7: the 3.6 (that uses the old mechanism) and the 3.7 (new mechanism).
56
# Both versions reflects how the database has been upgraded
60
# Both versions reflects how the database has been upgraded
57
my $already_knows = C4::Update::Database::list_versions_already_knows();
61
my $already_knows = C4::Update::Database::list_versions_already_knows();
Lines 65-91 for my $v ( @$already_knows ) { Link Here
65
    # if the current number is the previous one +1, then just add a ., for a better display N.........N+10, for example
69
    # if the current number is the previous one +1, then just add a ., for a better display N.........N+10, for example
66
    # (instead of N / N+1 / N+2 / ...)
70
    # (instead of N / N+1 / N+2 / ...)
67
    if ($current==$last_known+1) {
71
    if ($current==$last_known+1) {
68
        $kohaVersion.=".";
72
        $dbrev_applied.=".";
69
    } else { # we're not N+1, start a new range
73
    } else { # we're not N+1, start a new range
70
        # if version don't end by a ., no need to add the current loop number
74
        # if version don't end by a ., no need to add the current loop number
71
        # this avoid having N...N (in case of an isolated BDrev number)
75
        # this avoid having N...N (in case of an isolated BDrev number)
72
        if ($last_known & $kohaVersion =~ /\.$/) {
76
        if ($last_known & $dbrev_applied =~ /\.$/) {
73
            $kohaVersion .= "...".$last_known_sep;
77
            $dbrev_applied .= "...".$last_known_sep;
74
        }
78
        }
75
        # start a new range
79
        # start a new range
76
        $kohaVersion .= " / ".$v->{version};
80
        $dbrev_applied .= " ".$v->{version};
77
    }
81
    }
78
    $last_known= $current;
82
    $last_known= $current;
79
    $last_known_sep=$v->{version};
83
    $last_known_sep=$v->{version};
80
}
84
}
81
# add the last DB rev number, we don't want to end with "..."
85
# add the last DB rev number, we don't want to end with "..."
82
if ($kohaVersion =~ /\.$/) {
86
if ($dbrev_applied =~ /\.$/) {
83
    $kohaVersion .= "...".$last_known_sep;
87
    $dbrev_applied .= "...".$last_known_sep;
84
}
88
}
85
89
86
# remove any 0 just after a . for better readability (3.06.02.001 will become 3.6.2.1)
87
$kohaVersion =~ s/\.0+/\./g;
88
89
my $osVersion     = `uname -a`;
90
my $osVersion     = `uname -a`;
90
my $perl_path = $^X;
91
my $perl_path = $^X;
91
if ($^O ne 'VMS') {
92
if ($^O ne 'VMS') {
Lines 100-105 my $zebraVersion = `zebraidx -V`; Link Here
100
101
101
$template->param(
102
$template->param(
102
    kohaVersion   => $kohaVersion,
103
    kohaVersion   => $kohaVersion,
104
    dbrev_applied => $dbrev_applied,
103
    osVersion     => $osVersion,
105
    osVersion     => $osVersion,
104
    perlPath      => $perl_path,
106
    perlPath      => $perl_path,
105
    perlVersion   => $perlVersion,
107
    perlVersion   => $perlVersion,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt (-2 / +1 lines)
Lines 36-42 Link Here
36
36
37
        <table>
37
        <table>
38
            <caption>Server information</caption>
38
            <caption>Server information</caption>
39
            <tr><th scope="row">Koha version: </th><td>[% kohaVersion |html %]</td></tr>
39
            <tr><th scope="row">Koha version: </th><td>[% kohaVersion |html %] with the following database revisionapplied: [% dbrev_applied|html %]</td></tr>
40
            <tr><th scope="row">OS version ('uname -a'): </th><td>[% osVersion |html %]</td></tr>
40
            <tr><th scope="row">OS version ('uname -a'): </th><td>[% osVersion |html %]</td></tr>
41
            <tr><th scope="row">Perl interpreter: </th><td>[% perlPath |html %]</td></tr>
41
            <tr><th scope="row">Perl interpreter: </th><td>[% perlPath |html %]</td></tr>
42
            <tr><th scope="row">Perl version: </th><td>[% perlVersion |html %]</td></tr>
42
            <tr><th scope="row">Perl version: </th><td>[% perlVersion |html %]</td></tr>
43
- 

Return to bug 7167