my $dbh = C4::Context->dbh;
unless (C4::Context->preference('Version')){
- print $query->redirect("/cgi-bin/koha/installer/install.pl?step=3");
+ print $query->redirect("/cgi-bin/koha/installer/install.pl");
exit;
}
my $timeout = C4::Context->preference('timeout');
foreach my $file (@fnames){
# warn $file;
undef $/;
- my $strcmd="mysql ".($info{hostname}?"-h $info{hostname} ":"").($info{port}?"-P $info{port} ":"").($info{user}?"-u $info{user} ":"").($info{password}?"-p$info{password}":"")." $info{dbname} ";
+ my $strcmd="mysql ".($info{hostname}?" -h $info{hostname} ":"").($info{port}?" -P $info{port} ":"").($info{user}?" -u $info{user} ":"").($info{password}?" -p$info{password}":"")." $info{dbname} ";
my $error = qx($strcmd < $file 2>&1);
my @file = split qr(\/|\\),$file;
$lang=$file[scalar(@file)-3] unless ($lang);
#Import data structure and show errors if any
my $filename="kohastructure.sql";
undef $/;
- my $str = qx(mysql -h $info{hostname} -P $info{port} -u $info{user} -p$info{password} $info{dbname} <$filename 2>&1);
- $str=~s/\n|\r/<br \/>/g;
- $template->param("error"=>$str ,
+ my $strcmd="mysql ".($info{hostname}?"-h $info{hostname} ":"").($info{port}?"-P $info{port} ":"").($info{user}?"-u $info{user} ":"").($info{password}?"-p$info{password}":"")." $info{dbname} ";
+ my $str = qx($strcmd < $filename 2>&1);
+ $str=~s/\n|\r/<br \/>/g;
+ $template->param("error"=>$str ,
"$op"=> 1, );
} else {
#Check if there are enough tables.