X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=installer%2Finstall.pl;h=389dabd3b6ae858836d7d7aea317212e67e42f18;hb=3ad3e0e98452aaf7d319539248f5a8b48407f961;hp=419273a684fcdf51756c8681be9bbb1a9f10b9dd;hpb=34a27e01b138170f38324568a9d4fad596176ff8;p=koha_fer diff --git a/installer/install.pl b/installer/install.pl index 419273a684..389dabd3b6 100755 --- a/installer/install.pl +++ b/installer/install.pl @@ -4,7 +4,7 @@ use strict; use warnings; use diagnostics; -use InstallAuth; +use C4::InstallAuth; use CGI; use IPC::Cmd; @@ -185,11 +185,10 @@ elsif ( $step && $step == 3 ) { # we have finished, just redirect to mainpage. # print $query->redirect("/cgi-bin/koha/mainpage.pl"); - exit 1; + exit; } elsif ( $op && $op eq 'finish' ) { $installer->set_version_syspref(); - $installer->set_indexing_engine(0); # use Zebra # Installation is finished. # We just deny anybody access to install @@ -242,7 +241,7 @@ elsif ( $step && $step == 3 ) { $template->param( "frameworksloop" => $fwklist ); $template->param( "marcflavour" => ucfirst($marcflavour)); - my ($sample_defaulted_to_en, $levellist) = $installer->sample_data_sql_list($langchoice, $marcflavour); + my ($sample_defaulted_to_en, $levellist) = $installer->sample_data_sql_list($langchoice); $template->param( "en_sample_data" => $sample_defaulted_to_en); $template->param( "levelloop" => $levellist ); $template->param( "$op" => 1 ); @@ -312,6 +311,15 @@ 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"; + } + my $cmd = C4::Context->config("intranetdir") . "/installer/data/$info{dbms}/updatedatabase.pl"; my ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf) = IPC::Cmd::run(command => $cmd, verbose => 0); @@ -374,8 +382,6 @@ elsif ( $step && $step == 3 ) { ); } } - - $dbh->disconnect; } } else { @@ -391,8 +397,8 @@ else { if ( $rq->execute ) { my ($version) = $rq->fetchrow; if ($version) { - $query->redirect("install.pl?step=3"); - exit; + print $query->redirect("/cgi-bin/koha/installer/install.pl?step=3"); + exit; } } }