Project

General

Profile

Bug #31831 » class.t3lib_befunc.php.patch

Nikola Stojiljković, 2011-11-15 20:19

View differences:

t3lib/class.t3lib_befunc.php
}
}
// All FlexForm fields
$table = (!empty($GLOBALS['TYPO3_CONF_VARS']['SYS']['contentTable']) ? $GLOBALS['TYPO3_CONF_VARS']['SYS']['contentTable'] : 'tt_content');
$flexFormArray = self::getRegisteredFlexForms($table);
foreach ($flexFormArray as $tableField => $flexForms) {
// Prefix for field label, e.g. "Plugin Options:"
$labelPrefix = '';
if (!empty($GLOBALS['TCA'][$table]['columns'][$tableField]['label'])) {
$labelPrefix = $GLOBALS['LANG']->sl($GLOBALS['TCA'][$table]['columns'][$tableField]['label']);
}
// Get all sheets and title
foreach ($flexForms as $extIdent => $extConf) {
$extTitle = $GLOBALS['LANG']->sl($extConf['title']);
// Get all fields in sheet
foreach ($extConf['ds']['sheets'] as $sheetName => $sheet) {
if (empty($sheet['ROOT']['el']) || !is_array($sheet['ROOT']['el'])) {
continue;
}
foreach ($sheet['ROOT']['el'] as $fieldName => $field) {
// Use only excludeable fields
if (empty($field['TCEforms']['exclude'])) {
foreach ($tc_keys as $table) {
$flexFormArray = self::getRegisteredFlexForms($table);
foreach ($flexFormArray as $tableField => $flexForms) {
// Prefix for field label, e.g. "Plugin Options:"
$labelPrefix = '';
if (!empty($GLOBALS['TCA'][$table]['ctrl']['title'])) {
$labelPrefix = $GLOBALS['LANG']->sl($GLOBALS['TCA'][$table]['ctrl']['title']).': ';
}
if (!empty($GLOBALS['TCA'][$table]['columns'][$tableField]['label'])) {
$labelPrefix .= $GLOBALS['LANG']->sl($GLOBALS['TCA'][$table]['columns'][$tableField]['label']).': ';
}
// Get all sheets and title
foreach ($flexForms as $extIdent => $extConf) {
$extTitle = $GLOBALS['LANG']->sl($extConf['title']);
// Get all fields in sheet
foreach ($extConf['ds']['sheets'] as $sheetName => $sheet) {
if (empty($sheet['ROOT']['el']) || !is_array($sheet['ROOT']['el'])) {
continue;
}
$fieldLabel = (!empty($field['TCEforms']['label']) ? $GLOBALS['LANG']->sl($field['TCEforms']['label']) : $fieldName);
$fieldIdent = $table . ':' . $tableField . ';' . $extIdent . ';' . $sheetName . ';' . $fieldName;
$theExcludeArray[] = array(trim($labelPrefix . ' ' . $extTitle, ': ') . ': ' . $fieldLabel, $fieldIdent);
foreach ($sheet['ROOT']['el'] as $fieldName => $field) {
// Use only excludeable fields
if (empty($field['TCEforms']['exclude'])) {
continue;
}
$fieldLabel = (!empty($field['TCEforms']['label']) ? $GLOBALS['LANG']->sl($field['TCEforms']['label']) : $fieldName);
$fieldIdent = $table . ':' . $tableField . ';' . $extIdent . ';' . $sheetName . ';' . $fieldName;
$theExcludeArray[] = array(trim($labelPrefix . ' ' . $extTitle, ': ') . ': ' . $fieldLabel, $fieldIdent);
}
}
}
}
    (1-1/1)