mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-19 19:22:14 +02:00
Fix for mysqli_connect()
This commit is contained in:
parent
2dea9fadd4
commit
e28f3f5959
@ -1254,6 +1254,15 @@ function db_connect ($ignore_errors = false) {
|
||||
if ($ignore_errors != 0) $DEBUG_TEXT = '';
|
||||
$error_text = '';
|
||||
|
||||
static $link;
|
||||
if (isset($link) && $link) {
|
||||
if ($ignore_errors) {
|
||||
return array($link, $error_text);
|
||||
}
|
||||
return $link;
|
||||
}
|
||||
$link = 0;
|
||||
|
||||
if ($CONF['database_type'] == "mysql") {
|
||||
if (function_exists ("mysql_connect")) {
|
||||
$link = @mysql_connect ($CONF['database_host'], $CONF['database_user'], $CONF['database_password']) or $error_text .= ("<p />DEBUG INFORMATION:<br />Connect: " . mysql_error () . "$DEBUG_TEXT");
|
||||
|
Loading…
Reference in New Issue
Block a user