diff --git a/web/public_php/admin/functions_mysqli.php b/web/public_php/admin/functions_mysqli.php index d5ba09a9a..d5222ae2b 100644 --- a/web/public_php/admin/functions_mysqli.php +++ b/web/public_php/admin/functions_mysqli.php @@ -281,8 +281,16 @@ class sql_db_string extends sql_db $sqluser = $params[1]; $sqlpassword = $params[2]; $database = $params[4]; + $sqlport = 0; - $ret = parent::__construct($sqlserver, $sqluser, $sqlpassword, $database, $persistency); + $s = explode(":", $sqlserver, 2); + if (sizeof($s) == 2) + { + $sqlserver = $s[0]; + $sqlport = $s[1]; + } + + $ret = parent::__construct($sqlserver, $sqlport, $sqluser, $sqlpassword, $database, $persistency); } } return $ret;