diff -ru typo3_src-4.2.1_original/t3lib/class.t3lib_tceforms_inline.php typo3_src-4.2.1_patched/t3lib/class.t3lib_tceforms_inline.php --- typo3_src-4.2.1_original/t3lib/class.t3lib_tceforms_inline.php 2008-06-11 10:14:58.000000000 +0200 +++ typo3_src-4.2.1_patched/t3lib/class.t3lib_tceforms_inline.php 2008-07-17 20:34:10.000000000 +0200 @@ -816,7 +816,7 @@ // Put together the selector box: $selector_itemListStyle = isset($config['itemListStyle']) ? ' style="'.htmlspecialchars($config['itemListStyle']).'"' : ' style="'.$this->fObj->defaultMultipleSelectorStyle.'"'; $size = intval($conf['size']); - $size = $conf['autoSizeMax'] ? t3lib_div::intInRange(count($itemArray)+1,t3lib_div::intInRange($size,1),$conf['autoSizeMax']) : $size; + $size = $conf['autoSizeMax'] ? t3lib_div::intInRange(count($selItems) - count($uniqueIds) + 1, t3lib_div::intInRange($size, 1), $conf['autoSizeMax']) : $size; $onChange = "return inline.importNewRecord('".$this->inlineNames['object']."[".$conf['foreign_table']."]')"; $item = '