Project

General

Profile

Bug #25187 » 17777.patch

Administrator Admin, 2011-02-26 21:43

View differences:

t3lib/class.t3lib_extmgm.php (working copy)
public static function addToAllTCAtypes($table, $str, $specificTypesList = '', $position = '') {
t3lib_div::loadTCA($table);
$str = trim($str);
$palettesChanged = array();
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 (preg_match('/\b' . $palette . '\b/', $typeDetails['showitem']) > 0
&& preg_match('/\b' . $positionArray[1] . '\b/', $paletteDetails['showitem']) > 0) {
self::addFieldsToPalette($table, $palette, $str, $position);
// save that palette in case other types use it
$palettesChanged[] = $palette;
$fieldExists = TRUE;
} elseif (in_array($palette, $palettesChanged)) {
$fieldExists = TRUE;
}
}
} else {
(2-2/2)