Bugzilla – Attachment 11246 Details for
Bug 7167
updatedatabase improvements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7167 reindentation & removing dead code
Bug-7167-reindentation--removing-dead-code.patch (text/plain), 2.65 KB, created by
Paul Poulain
on 2012-08-01 09:43:16 UTC
(
hide
)
Description:
Bug 7167 reindentation & removing dead code
Filename:
MIME Type:
Creator:
Paul Poulain
Created:
2012-08-01 09:43:16 UTC
Size:
2.65 KB
patch
obsolete
>From 1c1fed788246911763fb679e6e8e8602bb3a5c22 Mon Sep 17 00:00:00 2001 >From: Paul Poulain <paul.poulain@biblibre.com> >Date: Wed, 1 Aug 2012 11:41:19 +0200 >Subject: [PATCH] Bug 7167 reindentation & removing dead code > >* The if (! defined $ENV{PERL5LIB}... block was wrongly intented >* The 3 lines running update.pl are useless: the update (new mechanism) is run from admin/updatedatabase.pl script. This part of install.pl is run only when you have "old style" DB revisions. > >Summary: > * old mechanism = it's run as previously, by reaching the installer/install.pl?step=3 page, that applies all revisions > * new mechanism = when you log-in or reach mainpage.pl, you reach admin/updatedatabase.pl, where you can see what will be run, and run it > >Tiny side effect = the check for old mechanism is now done *after* authentification (thus it's not done on each page call). It means that the user will have to enter login/password twice : > * first to log-in to Koha > * second to run installer/updatedatabase.pl?step=3 >As the old mechanism is deprecated, we can expect this will happend only a few time in the history of a setup, it's not a big deal. >--- > installer/install.pl | 19 +++++++------------ > 1 file changed, 7 insertions(+), 12 deletions(-) > >diff --git a/installer/install.pl b/installer/install.pl >index 6b97cba..01360e6 100755 >--- a/installer/install.pl >+++ b/installer/install.pl >@@ -312,14 +312,13 @@ elsif ( $step && $step == 3 ) { > # Not 1st install, the only sub-step : update database > # > #Do updatedatabase And report >- >- if ( ! defined $ENV{PERL5LIB} ) { >- my $find = "C4/Context.pm"; >- my $path = $INC{$find}; >- $path =~ s/\Q$find\E//; >- $ENV{PERL5LIB} = "$path:$path/installer"; >- warn "# plack? inserted PERL5LIB $ENV{PERL5LIB}\n"; >- } >+ if ( ! defined $ENV{PERL5LIB} ) { >+ my $find = "C4/Context.pm"; >+ my $path = $INC{$find}; >+ $path =~ s/\Q$find\E//; >+ $ENV{PERL5LIB} = "$path:$path/installer"; >+ warn "# plack? inserted PERL5LIB $ENV{PERL5LIB}\n"; >+ } > > my $koha39 = "3.0900028"; > my $cmd; >@@ -331,10 +330,6 @@ elsif ( $step && $step == 3 ) { > print_std( "updatedatabase.pl", $stdout_buf, $stderr_buf ); > $current_version= $koha39; > } >- $cmd = C4::Context->config("intranetdir") . "/installer/data/$info{dbms}/update.pl -all -min=$current_version"; >- my ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf) = IPC::Cmd::run(command => $cmd, verbose => 0); >- print_std( "update.pl", $stdout_buf, $stderr_buf ); >- > $template->param( $op => 1 ); > } > else { >-- >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