Project

General

Profile

Bug #23815 » 16096.diff

Administrator Admin, 2010-12-14 23:14

View differences:

t3lib/class.t3lib_extmgm.php (revision )
if ($str && is_array($GLOBALS['TCA'][$table]) && is_array($GLOBALS['TCA'][$table]['types'])) {
foreach ($GLOBALS['TCA'][$table]['types'] as $type => &$typeDetails) {
if ($specificTypesList === '' || t3lib_div::inList($specificTypesList, $type)) {
if ($position != '' && is_array($GLOBALS['TCA'][$table]['palettes'])) {
$fieldIsInPalette = FALSE;
$positionArray = t3lib_div::trimExplode(':', $position);
foreach($GLOBALS['TCA'][$table]['palettes'] as $palette => $paletteDetails) {
if (strstr($str, $typeDetails['showitem']) != FALSE
|| strstr($str, $paletteDetails['showitem']) != FALSE) {
$fieldIsInPalette = TRUE;
} else if (preg_match('/\b' . $palette . '/', $typeDetails['showitem']) != FALSE
&& preg_match('/\b' . $positionArray[1] . '/', $paletteDetails['showitem']) != FALSE) {
$position = $positionArray[0] . ':--palette--;;' . $palette;
}
}
}
if ($fieldIsInPalette === FALSE) {
$typeDetails['showitem'] = self::executePositionedStringInsertion(
$typeDetails['showitem'],
$str,
$position
);
}
}
}
}
$typeDetails['showitem'] = self::executePositionedStringInsertion(
$typeDetails['showitem'],
$str,
$position
);
}
}
}
}
}
/**
* Adds new fields to all palettes of an existing field.
(1-1/2)