Fix ' escaping.
This commit is contained in:
@@ -52,7 +52,7 @@ function PMA_DBI_real_connect($server, $user, $password, $client_flags, $persist
|
|||||||
function PMA_DBI_connect($user, $password, $is_controluser = false, $server = null, $auxiliary_connection = false)
|
function PMA_DBI_connect($user, $password, $is_controluser = false, $server = null, $auxiliary_connection = false)
|
||||||
{
|
{
|
||||||
global $cfg, $php_errormsg;
|
global $cfg, $php_errormsg;
|
||||||
|
|
||||||
if ($server) {
|
if ($server) {
|
||||||
$server_port = (empty($server['port']))
|
$server_port = (empty($server['port']))
|
||||||
? ''
|
? ''
|
||||||
@@ -92,7 +92,7 @@ function PMA_DBI_connect($user, $password, $is_controluser = false, $server = nu
|
|||||||
if (defined('MYSQL_CLIENT_SSL') && $cfg['Server']['ssl']) {
|
if (defined('MYSQL_CLIENT_SSL') && $cfg['Server']['ssl']) {
|
||||||
$client_flags |= MYSQL_CLIENT_SSL;
|
$client_flags |= MYSQL_CLIENT_SSL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$server) {
|
if (!$server) {
|
||||||
$link = PMA_DBI_real_connect($cfg['Server']['host'] . $server_port . $server_socket, $user, $password, empty($client_flags) ? NULL : $client_flags);
|
$link = PMA_DBI_real_connect($cfg['Server']['host'] . $server_port . $server_socket, $user, $password, empty($client_flags) ? NULL : $client_flags);
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ function PMA_DBI_connect($user, $password, $is_controluser = false, $server = nu
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!isset($server['host'])) {
|
if (!isset($server['host'])) {
|
||||||
$link = PMA_DBI_real_connect($server_socket, $user, $password, NULL, $server_persistant);
|
$link = PMA_DBI_real_connect($server_socket, $user, $password, NULL, $server_persistant);
|
||||||
} else {
|
} else {
|
||||||
$link = PMA_DBI_real_connect($server['host'] . $server_port . $server_socket, $user, $password, NULL, $server_persistant);
|
$link = PMA_DBI_real_connect($server['host'] . $server_port . $server_socket, $user, $password, NULL, $server_persistant);
|
||||||
}
|
}
|
||||||
@@ -206,7 +206,7 @@ function PMA_DBI_try_query($query, $link = null, $options = 0)
|
|||||||
$_SESSION['debug']['queries'][$hash]['trace'][] = $trace;
|
$_SESSION['debug']['queries'][$hash]['trace'][] = $trace;
|
||||||
}
|
}
|
||||||
if ($r != FALSE && PMA_Tracker::isActive() == TRUE ) {
|
if ($r != FALSE && PMA_Tracker::isActive() == TRUE ) {
|
||||||
PMA_Tracker::handleQuery($query);
|
PMA_Tracker::handleQuery($query);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $r;
|
return $r;
|
||||||
@@ -350,7 +350,7 @@ function PMA_DBI_getError($link = null)
|
|||||||
|
|
||||||
// Some errors messages cannot be obtained by mysql_error()
|
// Some errors messages cannot be obtained by mysql_error()
|
||||||
if ($error_number == 2002) {
|
if ($error_number == 2002) {
|
||||||
$error = '#' . ((string) $error_number) . ' - ' . __('The server is not responding') . ' ' . __('(or the local MySQL server's socket is not correctly configured)');
|
$error = '#' . ((string) $error_number) . ' - ' . __('The server is not responding') . ' ' . __('(or the local MySQL server\'s socket is not correctly configured)');
|
||||||
} elseif ($error_number == 2003) {
|
} elseif ($error_number == 2003) {
|
||||||
$error = '#' . ((string) $error_number) . ' - ' . __('The server is not responding');
|
$error = '#' . ((string) $error_number) . ' - ' . __('The server is not responding');
|
||||||
} elseif ($error_number == 1005) {
|
} elseif ($error_number == 1005) {
|
||||||
|
Reference in New Issue
Block a user