Fixed bug #8991: IRRE - Sorting icons of inline records are in wrong order
authorOliver Hader <oliver.hader@typo3.org>
Mon, 12 Jan 2009 18:05:27 +0000 (18:05 +0000)
committerOliver Hader <oliver.hader@typo3.org>
Mon, 12 Jan 2009 18:05:27 +0000 (18:05 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-2@4700 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tceforms_inline.php

index b021221..c225cc5 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-01-12  Oliver Hader  <oliver@typo3.org>
+
+       * Fixed bug #8991: IRRE - Sorting icons of inline records are in wrong order
+
 2009-01-11  Oliver Hader  <oliver@typo3.org>
 
        * Fixed bug #5630: Install tool removes dots from admin usernames (thanks to Stefano Kowalke)
index 3160d52..eed581b 100755 (executable)
@@ -222,8 +222,9 @@ class t3lib_TCEforms_inline {
                        // get the records related to this inline record
                $relatedRecords = $this->getRelatedRecords($table,$field,$row,$PA,$config);
                        // set the first and last record to the config array
-               $config['inline']['first'] = $relatedRecords['records'][0]['uid'];
-               $config['inline']['last'] = $relatedRecords['records'][$relatedRecords['count']-1]['uid'];
+               $relatedRecordsUids = array_keys($relatedRecords['records']);
+               $config['inline']['first'] = reset($relatedRecordsUids);
+               $config['inline']['last'] = end($relatedRecordsUids);
 
                        // Tell the browser what we have (using JSON later):
                $top = $this->getStructureLevel(0);