diff --git a/ChangeLog b/ChangeLog index ce19b333f..a9be3a5a1 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2005-10-23 Marc Delisle + * libraries/relation.lib.php: there is already a function to do this + sort (thanks to Sebastian) + 2005-10-21 Marc Delisle * libraries/relation.lib.php: foreign dropdowns: sort id-content by id and content-id by content diff --git a/libraries/relation.lib.php b/libraries/relation.lib.php index a68127c27..018f31582 100644 --- a/libraries/relation.lib.php +++ b/libraries/relation.lib.php @@ -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); }