diff --git a/install.php b/install.php index de318c3a..7d90b523 100644 --- a/install.php +++ b/install.php @@ -310,8 +310,10 @@ preg_match_all("/((SET|CREATE|INSERT).+)\n\n/msU", $sql, $queries); $queries = $queries[1]; + $sql_errors = ''; foreach($queries as &$query) { - query($query) or error(db_error()); + if(!query($query)) + $sql_errors .= '
Thank you for using Tinyboard. Please remember to report any bugs you discover.
'; + if(!empty($sql_errors)) { + $page['body'] .= 'SQL errors were encountered when trying to install the database. This may be the result of using a database which is already occupied with a Tinyboard installation; if so, you can probably ignore this.
The errors encountered were:
I couldn\'t remove install.php. You will have to remove it manually.
Thank you for using Tinyboard. Please remember to report any bugs you discover.
'; + + touch($config['has_installed'], 0777); if(!@unlink(__FILE__)) { - $page['body'] = 'I couldn\'t remove install.php. You will have to remove it manually.
'; + $page['body'] .= 'I couldn\'t remove install.php. You will have to remove it manually.