Index: t3lib/class.t3lib_extmgm.php =================================================================== --- t3lib/class.t3lib_extmgm.php (revision 4488) +++ t3lib/class.t3lib_extmgm.php (working copy) @@ -289,7 +289,7 @@ if (is_array($types)) { // Iterate through all types and search for the field that defines the palette to be extended: foreach (array_keys($types) as $type) { - $fields = self::getFieldsOfFieldList($types[$type]['showitem']); + $fields = self::getFieldsFromFieldList($types[$type]['showitem']); if (isset($fields[$field])) { // If the field already has a palette, extend it: if ($fields[$field]['details']['palette']) { @@ -368,7 +368,7 @@ // Insert data before or after insertion points: } else { $positions = t3lib_div::trimExplode(',', $insertionPosition, true); - $fields = self::getFieldsOfFieldList($list); + $fields = self::getFieldsFromFieldList($list); $isInserted = false; // Iterate through all fields an check whether it's possible to inserte there: foreach ($fields as $field => &$fieldDetails) { @@ -447,7 +447,7 @@ * @see executePositionedStringInsertion * @param string $field: The name of the field/item * @param array $fieldDetails: Additional details of the field like e.g. palette information - * (this array gets created by the function getFieldsOfFieldList()) + * (this array gets created by the function getFieldsFromFieldList()) * @return array The needled to be used for inserting content before or after existing fields/items */ protected static function getInsertionNeedles($field, array $fieldDetails) { @@ -473,21 +473,32 @@ * (this mostly reflects the data in $TCA[]['types'][]['showitem']) * @return array An array with the names of the fields as keys and additional information */ - protected static function getFieldsOfFieldList($fieldList) { + protected static function getFieldsFromFieldList($fieldList) { $fields = array(); $fieldParts = t3lib_div::trimExplode(',', $fieldList, true); foreach ($fieldParts as $fieldPart) { $fieldDetails = t3lib_div::trimExplode(';', $fieldPart, false, 5); - if (!isset($fields[$fieldDetails[0]])) { + if ($fieldDetails[0] != '--div--' && !isset($fields[$fieldDetails[0]])) { $fields[$fieldDetails[0]] = array( 'rawData' => $fieldPart, 'details' => array( - 'field' => $fieldDetails[0], - 'label' => $fieldDetails[1], + 'field' => $fieldDetails[0], + 'label' => $fieldDetails[1], 'palette' => $fieldDetails[2], 'special' => $fieldDetails[3], - 'styles' => $fieldDetails[4], + 'styles' => $fieldDetails[4], + ), + ); + } elseif ($fieldDetails[0] == '--div--') { + $fields[$fieldDetails[0] . ';' . $fieldDetails[1]] = array( + 'rawData' => $fieldPart, + 'details' => array( + 'field' => $fieldDetails[0], + 'label' => $fieldDetails[1], + 'palette' => '', + 'special' => '', + 'styles' => '' ), ); } @@ -497,9 +508,9 @@ } /** - * Generates a list of fields/items out of an array provided by the function getFieldsOfFieldList(). + * Generates a list of fields/items out of an array provided by the function getFieldsFromFieldList(). * - * @see getFieldsOfFieldList + * @see getFieldsFromFieldList * @param array $fields: The array of fields with optional additional information * @param boolean $useRawData: Use raw data instead of building by using the details (default: false) * @return string The list of fields/items which gets used for $TCA[
]['types'][]['showitem']