* 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

@@ -89,11 +89,18 @@ defined('MYAAC') or die('Direct access not allowed!');
'log' => $config['database_log']
)
);
$db = POT::getInstance()->getDBHandle();
}
catch(PDOException $error) {
if(isset($cache) && $cache->enabled()) {
$cache->delete('config_lua');
}
if(defined('MYAAC_INSTALL')) {
return; // installer will take care of this
}
die('ERROR: Cannot connect to MySQL database.<br/>' .
'Possible reasons:' .
'<ul>' .
@@ -102,5 +109,4 @@ defined('MYAAC') or die('Direct access not allowed!');
'</ul>' . $error);
}
$db = POT::getInstance()->getDBHandle();
?>