use warnings;
use diagnostics;
-use InstallAuth;
+use C4::InstallAuth;
use CGI;
use IPC::Cmd;
}
( $template, $loggedinuser, $cookie ) = get_template_and_user(
{
- template_name => "installer/step" . ( $step ? $step : 1 ) . ".tmpl",
+ template_name => "installer/step" . ( $step ? $step : 1 ) . ".tt",
query => $query,
type => "intranet",
authnotrequired => 0,
$template->param( language => 1 );
$template->param( 'checkmodule' => 1 ); # we start with the assumption that there are no problems and set this to 0 if there are
- unless ( $] >= 5.008008 ) { # Bug 4505
+ unless ( $] >= 5.010000 ) { # Bug 7375
$template->param( problems => 1, perlversion => 1, checkmodule => 0 );
}
# 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
$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 );
# 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);
}
else {
#
- # check wether it's a 1st install or an update
+ # check whether it's a 1st install or an update
#
#Check if there are enough tables.
# Paul has cleaned up tables so reduced the count
);
}
}
-
- $dbh->disconnect;
}
}
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;
}
}
}