From 8581fe4bbda505d6a04395ee8789b7860c7c6ddd Mon Sep 17 00:00:00 2001 From: tipaul Date: Tue, 26 Jun 2007 14:30:22 +0000 Subject: [PATCH] updating web installer : going to step1 if needed and fixing sql --- C4/Auth.pm | 2 +- installer/install.pl | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 8a250b148f..3db1400eb4 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -339,7 +339,7 @@ sub checkauth { 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'); diff --git a/installer/install.pl b/installer/install.pl index 58796b4d2a..b4ae8d3913 100755 --- a/installer/install.pl +++ b/installer/install.pl @@ -223,7 +223,7 @@ if ($step && $step==1){ 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); @@ -336,9 +336,10 @@ if ($step && $step==1){ #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/
/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/
/g; + $template->param("error"=>$str , "$op"=> 1, ); } else { #Check if there are enough tables. -- 2.39.5