bug #2938492 information_schema sorting order

This commit is contained in:
Marc Delisle
2010-01-24 10:52:30 +00:00
parent cac4384a8c
commit fa83f17fc1
2 changed files with 13 additions and 6 deletions

View File

@@ -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,

View File

@@ -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);
}