MySQL 3.23.52 compatibility

This commit is contained in:
Marc Delisle
2006-03-14 17:59:49 +00:00
parent e35b13a8a6
commit 39356b5042
2 changed files with 16 additions and 3 deletions

View File

@@ -8,6 +8,7 @@ $Source$
2006-03-14 Marc Delisle <lem9@users.sourceforge.net> 2006-03-14 Marc Delisle <lem9@users.sourceforge.net>
* libraries/common.lib.php: bug #1449715, loading of binary data very slow * libraries/common.lib.php: bug #1449715, loading of binary data very slow
* server_privileges.php: compatibility with MySQL < 4.0.2 * server_privileges.php: compatibility with MySQL < 4.0.2
* server_databases.php: bug #1445991, compatibility with MySQL 3.23.52
2006-03-13 Marc Delisle <lem9@users.sourceforge.net> 2006-03-13 Marc Delisle <lem9@users.sourceforge.net>
* libraries/Config.class.php, /common.lib.php: bug #1445120, * libraries/Config.class.php, /common.lib.php: bug #1445120,

View File

@@ -124,9 +124,20 @@ if ($server > 0) {
/** /**
* Displays the page * Displays the page
*/ */
if (count($databases) > 0) {
// sorts the array $tmp_count = count($databases);
usort( $databases, 'PMA_dbCmp' ); if ($tmp_count > 0) {
if ($tmp_count > 1) {
// sorts the array
usort( $databases, 'PMA_dbCmp' );
} else {
// when there is only one database, the sort would not happen and
// the index would not become numeric (reproduced in MySQL 3.23.52)
$tmp_each = each($databases);
$databases = array();
$databases[0] = $tmp_each['value'];
unset($tmp_each);
}
// table col order // table col order
// there is no db specific collation or charset prior 4.1.0 // there is no db specific collation or charset prior 4.1.0
@@ -332,6 +343,7 @@ if (count($databases) > 0) {
} else { } else {
echo $strNoDatabases; echo $strNoDatabases;
} }
unset($tmp_count);
/** /**
* Create new database. * Create new database.