diff --git a/ChangeLog b/ChangeLog index 26ff7c9b1..da8c8e41b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -90,6 +90,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA - bug #2926613 [edit] Copy database shows errors when DB has foreign key 3.2.6.0 (not yet released) +- bug #2938492 [display] information_schema sorting order 3.2.5.0 (2010-01-10) - patch #2903400 [bookmarks] Status of bookmark table, diff --git a/libraries/List_Database.class.php b/libraries/List_Database.class.php index 17df2d80a..5744f3101 100644 --- a/libraries/List_Database.class.php +++ b/libraries/List_Database.class.php @@ -104,6 +104,9 @@ require_once './libraries/List.class.php'; * @uses PMA_List_Database::$_db_link_control in case of SHOW DATABASES is disabled for userlink * @uses PMA_DBI_fetch_result() * @uses PMA_DBI_getError() + * @uses natsort() + * @uses sort() + * @uses $cfg['NaturalOrder'] * @uses $GLOBALS['error_showdatabases'] * @uses $GLOBALS['errno'] * @param string $like_db_name usally a db_name containing wildcards @@ -143,6 +146,14 @@ require_once './libraries/List.class.php'; $this->_show_databases_disabled = true; } } + + if ($GLOBALS['cfg']['NaturalOrder']) { + natsort($database_list); + } else { + // need to sort anyway, otherwise information_schema + // goes at the top + sort($database_list); + } return $database_list; } @@ -154,17 +165,12 @@ require_once './libraries/List.class.php'; * @uses PMA_List_Database::_checkOnlyDatabase() * @uses PMA_List_Database::_retrieve() * @uses PMA_List_Database::_checkHideDatabase() - * @uses array_values() - * @uses natsort() - * @uses $cfg['NaturalOrder'] + * @uses exchangeArray() */ public function build() { if (! $this->_checkOnlyDatabase()) { $items = $this->_retrieve(); - if ($GLOBALS['cfg']['NaturalOrder']) { - natsort($items); - } $this->exchangeArray($items); }