Project

General

Profile

Bug #21594 » 12643_4.3-beta3.diff

Administrator Admin, 2009-11-17 21:11

View differences:

t3lib/class.t3lib_befunc.php (working copy)
// Get fields list and traverse it
$fieldList = explode(',', $typesConf['showitem']);
$paletteFieldList = array();
$altFieldList = array();
// Traverse fields in types config and parse the configuration into a nice array:
......
if ($useFieldNameAsKey) {
$altFieldList[$fieldList[$k]['field']] = $fieldList[$k];
}
if ($pPalette && $TCA[$table]['palettes'][$pPalette]) {
$paletteFields = t3lib_div::trimExplode(',', $TCA[$table]['palettes'][$pPalette]['showitem']);
foreach ($paletteFields as $paletteFieldName) {
$paletteFieldList[] = $paletteFieldName;
}
}
}
foreach ($paletteFieldList as $paletteFieldName) {
$defaultExtras = is_array($TCA[$table]['columns'][$paletteFieldName]) ? $TCA[$table]['columns'][$paletteFieldName]['defaultExtras'] : '';
$specConfParts = t3lib_BEfunc::getSpecConfParts('', $defaultExtras);
$addPaletteFieldToFieldList = array (
'field' => $paletteFieldName,
'title' => '',
'palette' => '',
'spec' => $specConfParts,
'origString' => $paletteFieldName
);
if ($useFieldNameAsKey) {
$altFieldList[$paletteFieldName] = $addPaletteFieldToFieldList;
} else {
$fieldList[] = $addPaletteFieldToFieldList;
}
}
if ($useFieldNameAsKey) {
$fieldList = $altFieldList;
}
(1-1/3)