Better fix against possible "wrong parameter count" errors.
This commit is contained in:
@@ -5,10 +5,14 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2003-04-12 Alexander M. Turek <rabus@users.sourceforge.net>
|
||||
* libraries/common.lib.php3: Better fix against possible "wrong parameter
|
||||
count" errors.
|
||||
|
||||
2003-04-11 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* libraries/common.lib.php3, config_import.lib.php3:
|
||||
MaxExactCount backwards compatibility
|
||||
* db_details_structure.php3: undefined $row_count for InnoDB tables
|
||||
* db_details_structure.php3: undefined $row_count for InnoDB tables
|
||||
|
||||
2003-04-11 Michal Cihar <nijel@users.sourceforge.net>
|
||||
* db_details_structure.php3: Get row count by SHOW TABLE STATUS, and by
|
||||
|
@@ -732,8 +732,8 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
|
||||
$server_socket = (empty($cfg['Server']['socket']) || PMA_PHP_INT_VERSION < 30010)
|
||||
? ''
|
||||
: ':' . $cfg['Server']['socket'];
|
||||
if (PMA_PHP_INT_VERSION >= 40300) {
|
||||
$client_flags = ($cfg['Server']['compress'] ? MYSQL_CLIENT_COMPRESS : 0);
|
||||
if (PMA_PHP_INT_VERSION >= 40300 && PMA_MYSQL_CLIENT_API >= 32349) {
|
||||
$client_flags = $cfg['Server']['compress'] && defined('MYSQL_CLIENT_COMPRESS') ? MYSQL_CLIENT_COMPRESS : 0;
|
||||
}
|
||||
|
||||
// Gets the authentication library that fits the $cfg['Server'] settings
|
||||
@@ -804,8 +804,13 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
|
||||
// must be open after this one so it would be default one for all the
|
||||
// scripts)
|
||||
if ($cfg['Server']['controluser'] != '') {
|
||||
// rabus: 3.23.49 is the MySQL client API bundled with php 4.3.0.
|
||||
if (PMA_PHP_INT_VERSION >= 40300 && PMA_MYSQL_CLIENT_API >= 32349) {
|
||||
if (empty($client_flags)) {
|
||||
$dbh = @$connect_func(
|
||||
$cfg['Server']['host'] . $server_port . $server_socket,
|
||||
$cfg['Server']['controluser'],
|
||||
$cfg['Server']['controlpass']
|
||||
);
|
||||
} else {
|
||||
$dbh = @$connect_func(
|
||||
$cfg['Server']['host'] . $server_port . $server_socket,
|
||||
$cfg['Server']['controluser'],
|
||||
@@ -813,12 +818,6 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
|
||||
FALSE,
|
||||
$client_flags
|
||||
);
|
||||
} else {
|
||||
$dbh = @$connect_func(
|
||||
$cfg['Server']['host'] . $server_port . $server_socket,
|
||||
$cfg['Server']['controluser'],
|
||||
$cfg['Server']['controlpass']
|
||||
);
|
||||
}
|
||||
if ($dbh == FALSE) {
|
||||
if (PMA_mysql_error()) {
|
||||
@@ -832,7 +831,7 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
|
||||
. $cfg['Server']['host'] . $server_port . $server_socket . ', '
|
||||
. $cfg['Server']['controluser'] . ', '
|
||||
. $cfg['Server']['controlpass']
|
||||
. (PMA_PHP_INT_VERSION >= 40300 ? ', FALSE, ' . $client_flags : '')
|
||||
. (empty($client_flags) ? '' : ', FALSE, ' . $client_flags)
|
||||
. ')';
|
||||
if (empty($GLOBALS['is_header_sent'])) {
|
||||
include('./header.inc.php3');
|
||||
@@ -846,7 +845,13 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
|
||||
// Robbat2 - May 11, 2002
|
||||
|
||||
// Connects to the server (validates user's login)
|
||||
if (PMA_PHP_INT_VERSION >= 40300) {
|
||||
if (empty($client_flags)) {
|
||||
$userlink = @$connect_func(
|
||||
$cfg['Server']['host'] . $server_port . $server_socket,
|
||||
$cfg['Server']['user'],
|
||||
$cfg['Server']['password']
|
||||
);
|
||||
} else {
|
||||
$userlink = @$connect_func(
|
||||
$cfg['Server']['host'] . $server_port . $server_socket,
|
||||
$cfg['Server']['user'],
|
||||
@@ -854,13 +859,6 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
|
||||
FALSE,
|
||||
$client_flags
|
||||
);
|
||||
} else {
|
||||
$userlink = @$connect_func(
|
||||
$cfg['Server']['host'] . $server_port . $server_socket,
|
||||
$cfg['Server']['user'],
|
||||
$cfg['Server']['password']
|
||||
);
|
||||
|
||||
}
|
||||
if ($userlink == FALSE) {
|
||||
PMA_auth_fails();
|
||||
|
Reference in New Issue
Block a user