* install: better error message on database failed connect

* changed <p> tag to <div> in notification messages
This commit is contained in:
slawkens1
2018-01-13 21:18:21 +01:00
parent 9738c1896d
commit fc243466da
11 changed files with 98 additions and 53 deletions

View File

@@ -5,8 +5,20 @@ require(SYSTEM . 'libs/pot/OTS.php');
$ots = POT::getInstance();
require(SYSTEM . 'database.php');
if($db->hasTable('accounts'))
define('USE_ACCOUNT_NAME', $db->hasColumn('accounts', 'name'));
else
if(!isset($db)) {
$database_error = $locale['step_database_error_mysql_connect'] . '<br/>' .
$locale['step_database_error_mysql_connect_2'] .
'<ul>' .
'<li>' . $locale['step_database_error_mysql_connect_3'] . '</li>' .
'<li>' . $locale['step_database_error_mysql_connect_4'] . '</li>' .
'</ul>' . '<br/>' . $error;
}
else {
if($db->hasTable('accounts'))
define('USE_ACCOUNT_NAME', $db->hasColumn('accounts', 'name'));
}
if(!defined('USE_ACCOUNT_NAME')) {
define('USE_ACCOUNT_NAME', false);
}
?>