natural order sort if possible

This commit is contained in:
Marc Delisle
2004-08-08 18:20:47 +00:00
parent 160e4e29bc
commit c469625d0b
2 changed files with 6 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ $Source$
* libraries/relation.lib.php: bug 1005414, undefined offset when
no display field has been defined; bug 1004546, sort error in dropdown
list of foreign values; incorrect result was freed
* libraries/relation.lib.php: use natural order sort according to config
2004-08-08 Michal Čihař <michal@cihar.com>
* calendar.php: Include correct stylesheet (bug #1005421).

View File

@@ -654,7 +654,11 @@ function PMA_foreignDropdown($disp, $foreign_field, $foreign_display, $data, $ma
} // end while
// the list of keys looks better if not sorted by description
asort($reloptions['content-id']);
if ($cfg['NaturalOrder']) {
natsort($reloptions['content-id']); }
else {
asort($reloptions['content-id']);
}
if ($max == -1 || count($reloptions['content-id']) < $max) {
$ret .= implode('', $reloptions['content-id']);