already a function to do the job
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2005-10-23 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* libraries/relation.lib.php: there is already a function to do this
|
||||
sort (thanks to Sebastian)
|
||||
|
||||
2005-10-21 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* libraries/relation.lib.php: foreign dropdowns: sort id-content by id
|
||||
and content-id by content
|
||||
|
@@ -733,28 +733,6 @@ function PMA_purgeHistory($username) {
|
||||
} // end of 'PMA_purgeHistory()' function
|
||||
|
||||
|
||||
/**
|
||||
* Case insensitive natural sort on keys
|
||||
*
|
||||
* @param &array the array to sort
|
||||
*
|
||||
* @return bool TRUE on success (how could it fail? :)
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
|
||||
function PMA_natcaseksort(&$array) {
|
||||
$keys = array_keys($array);
|
||||
natcasesort($keys);
|
||||
|
||||
foreach ($keys as $k) {
|
||||
$new_array[$k] = $array[$k];
|
||||
}
|
||||
$array = $new_array;
|
||||
return TRUE;
|
||||
} // end of 'PMA_natcaseksort' function
|
||||
|
||||
|
||||
/**
|
||||
* Prepares the dropdown for one mode
|
||||
*
|
||||
@@ -841,7 +819,7 @@ function PMA_foreignDropdown($disp, $foreign_field, $foreign_display, $data, $ma
|
||||
|
||||
// sort for id-content
|
||||
if ($cfg['NaturalOrder']) {
|
||||
PMA_natcaseksort($foreign);
|
||||
uksort($foreign, 'strnatcasecmp');
|
||||
} else {
|
||||
ksort($foreign);
|
||||
}
|
||||
|
Reference in New Issue
Block a user