59112.patch

Andreas Kiessling, 2014-10-16 09:58

Download (759 Bytes)

View differences:

typo3/sysext/backend/Classes/Form/Element/InlineElement.php
1540 1540
				}
1541 1541
			}
1542 1542
		}
1543

  
1544
		if ($relatedRecords['count'] > 0
1545
			&& isset($GLOBALS['TCA'][$table]['columns'][$field]['config']['foreign_sortby'])
1546
		) {
1547
			$sortField = $GLOBALS['TCA'][$table]['columns'][$field]['config']['foreign_sortby'];
1548
			usort($relatedRecords['records'], function (array $a, array $b) use ($sortField) {
1549
				return $a[$sortField] > $b[$sortField];
1550
			});
1551
		}
1552

  
1543 1553
		return $relatedRecords;
1544 1554
	}
1545 1555