Separate database support error from table creation error; give a more appropriate message when the database isn't supported
git-svn-id: file:///home/shish/svn/shimmie2/trunk@566 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
c47e15c01b
commit
f4a41d0b58
16
install.php
16
install.php
@ -163,13 +163,21 @@ function create_tables($dsn) { // {{{
|
|||||||
die("Couldn't connect to \"$dsn\"");
|
die("Couldn't connect to \"$dsn\"");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if((substr($dsn, 0, 5) == "mysql") && create_tables_mysql($db)) {
|
if(substr($dsn, 0, 5) == "mysql") {
|
||||||
$_SESSION['tables_created'] = true;
|
if(create_tables_mysql($db)) {
|
||||||
|
$_SESSION['tables_created'] = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if((substr($dsn, 0, 5) == "pgsql" || substr($dsn, 0, 8) == "postgres") && create_tables_pgsql($db)) {
|
else if(substr($dsn, 0, 5) == "pgsql" || substr($dsn, 0, 8) == "postgres") {
|
||||||
$_SESSION['tables_created'] = true;
|
if(create_tables_pgsql($db)) {
|
||||||
|
$_SESSION['tables_created'] = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
die("This database format isn't currently supported. Please use either MySQL or PostgreSQL.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!isset($_SESSION['tables_created']) || !$_SESSION['tables_created']) {
|
||||||
die("Error creating tables");
|
die("Error creating tables");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user