Bugzilla – Attachment 9861 Details for
Bug 7167
updatedatabase improvements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7167, tiny display change, separating koha number and DBrev applied
Bug-7167-tiny-display-change-separating-koha-numbe.patch (text/plain), 4.03 KB, created by
Paul Poulain
on 2012-05-31 13:53:30 UTC
(
hide
)
Description:
Bug 7167, tiny display change, separating koha number and DBrev applied
Filename:
MIME Type:
Creator:
Paul Poulain
Created:
2012-05-31 13:53:30 UTC
Size:
4.03 KB
patch
obsolete
>From 66a959f28b896c200dd6bc8b8b19a830f2596ae0 Mon Sep 17 00:00:00 2001 >From: Paul Poulain <paul.poulain@biblibre.com> >Date: Fri, 4 May 2012 14:28:51 +0200 >Subject: [PATCH] Bug 7167, tiny display change, separating koha number and > DBrev applied > >This patch separated the Koha number and the list of database revision that have been applied on this database. > >Before the patch: a single string was computed in .pl and displayed >After the patch: the string containing the kohaVersion and the string containing the list of database revisions applied have been splitted in 2 separate T::T variable >The display has been updated a little, with a new string in the template >--- > about.pl | 22 ++++++++++++---------- > koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 2 +- > 2 files changed, 13 insertions(+), 11 deletions(-) > >diff --git a/about.pl b/about.pl >index b0364d3..0048b20 100755 >--- a/about.pl >+++ b/about.pl >@@ -51,7 +51,11 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > my $kohaVersion = C4::Context->preference("Version"); > # restore ., for display consistency > $kohaVersion =~ /(.)\.(..)(..)(...)/; >-$kohaVersion = "$1.$2.$3.$4"; >+# transform digits to Perl number, to display 3.6.1.2 instead of 3.06.01.002 >+$kohaVersion = ($1+0).".".($2+0).".".($3+0).".".($4+0); >+ >+my $dbrev_applied=""; # the list of database revisions >+ > # the $kohaVersion is duplicated since 3.7: the 3.6 (that uses the old mechanism) and the 3.7 (new mechanism). > # Both versions reflects how the database has been upgraded > my $already_knows = C4::Update::Database::list_versions_already_knows(); >@@ -65,27 +69,24 @@ for my $v ( @$already_knows ) { > # if the current number is the previous one +1, then just add a ., for a better display N.........N+10, for example > # (instead of N / N+1 / N+2 / ...) > if ($current==$last_known+1) { >- $kohaVersion.="."; >+ $dbrev_applied.="."; > } else { # we're not N+1, start a new range > # if version don't end by a ., no need to add the current loop number > # this avoid having N...N (in case of an isolated BDrev number) >- if ($last_known & $kohaVersion =~ /\.$/) { >- $kohaVersion .= "...".$last_known_sep; >+ if ($last_known & $dbrev_applied =~ /\.$/) { >+ $dbrev_applied .= "...".$last_known_sep; > } > # start a new range >- $kohaVersion .= " / ".$v->{version}; >+ $dbrev_applied .= " ".$v->{version}; > } > $last_known= $current; > $last_known_sep=$v->{version}; > } > # add the last DB rev number, we don't want to end with "..." >-if ($kohaVersion =~ /\.$/) { >- $kohaVersion .= "...".$last_known_sep; >+if ($dbrev_applied =~ /\.$/) { >+ $dbrev_applied .= "...".$last_known_sep; > } > >-# remove any 0 just after a . for better readability (3.06.02.001 will become 3.6.2.1) >-$kohaVersion =~ s/\.0+/\./g; >- > my $osVersion = `uname -a`; > my $perl_path = $^X; > if ($^O ne 'VMS') { >@@ -100,6 +101,7 @@ my $zebraVersion = `zebraidx -V`; > > $template->param( > kohaVersion => $kohaVersion, >+ dbrev_applied => $dbrev_applied, > osVersion => $osVersion, > perlPath => $perl_path, > perlVersion => $perlVersion, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >index f4f0def..c5e267b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >@@ -36,7 +36,7 @@ > > <table> > <caption>Server information</caption> >- <tr><th scope="row">Koha version: </th><td>[% kohaVersion |html %]</td></tr> >+ <tr><th scope="row">Koha version: </th><td>[% kohaVersion |html %] with the following database revisionapplied: [% dbrev_applied|html %]</td></tr> > <tr><th scope="row">OS version ('uname -a'): </th><td>[% osVersion |html %]</td></tr> > <tr><th scope="row">Perl interpreter: </th><td>[% perlPath |html %]</td></tr> > <tr><th scope="row">Perl version: </th><td>[% perlVersion |html %]</td></tr> >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7167
:
6377
|
6378
|
6379
|
6381
|
6414
|
6415
|
6416
|
6476
|
6477
|
6478
|
6479
|
6722
|
6832
|
7903
|
8178
|
9859
|
9860
|
9861
|
9862
|
10033
|
10034
|
10549
|
10666
|
10667
|
10668
|
10825
|
11129
|
11222
|
11223
|
11224
|
11225
|
11226
|
11227
|
11228
|
11229
|
11230
|
11231
|
11232
|
11235
|
11236
|
11237
|
11238
|
11239
|
11240
|
11241
|
11242
|
11243
|
11244
|
11245
|
11246
|
11571
|
13423
|
13424
|
13425
|
13426
|
13427
|
13428
|
13429
|
13430
|
13431
|
13432
|
13433
|
13434
|
13435
|
13436
|
13437
|
13456
|
13457
|
13509
|
13516
|
13517
|
13518
|
13519
|
13520
|
13521
|
13522
|
13523
|
13524
|
13525
|
13526
|
13527
|
13528
|
13529
|
13733
|
13734
|
13842
|
13845
|
13848
|
13851
|
13852
|
13853
|
13854
|
14310
|
16113
|
16114
|
16115
|
16116
|
16117
|
16596