forked from science-ation/science-ation
Fix the file that gets imported for step 2, add more checking to step 3
This commit is contained in:
parent
4034991742
commit
65954a35b9
@ -103,7 +103,7 @@ mysql_select_db($DBNAME);
|
||||
|
||||
echo "Setting up database tables... ";
|
||||
|
||||
system("mysql -h$DBHOST -u$DBUSER -p$DBPASS $DBNAME <db/db.full.$ver.sql");
|
||||
system("mysql -h$DBHOST -u$DBUSER -p$DBPASS $DBNAME <db/db.full.$dbcodeversion.sql");
|
||||
|
||||
echo "<b>Done! installed database version $dbcodeversion</b><br />\n";
|
||||
$fp=fopen("db/db.db.version.txt","w");
|
||||
|
@ -66,6 +66,15 @@ mysql_select_db($DBNAME);
|
||||
|
||||
//if there are entries in the config table for year=0, then this is NOT a fresh install, so error out
|
||||
$q=mysql_query("SELECT * FROM config WHERE year='0'");
|
||||
//we might get an error if the config table does not exist (ie, step 2 failed)
|
||||
if(mysql_error())
|
||||
{
|
||||
//we say all tables, but really only we check for config where year=0;
|
||||
echo "<div class=\"error\">ERROR: No SFIAB tables detected, It seems like step 2 failed. Please go <a href=\"install2.php\">Back to Installation Step 2</a> and try again.</div>";
|
||||
echo "</body></html>";
|
||||
exit;
|
||||
|
||||
}
|
||||
if(mysql_num_rows($q))
|
||||
{
|
||||
//we say all tables, but really only we check for config where year=0;
|
||||
|
Loading…
Reference in New Issue
Block a user