Project

General

Profile

Feature #17745 » 6635_class.t3lib_transferdata_v2.patch

Administrator Admin, 2007-11-22 15:35

View differences:

class.t3lib_transferdata.php (working copy)
foreach($TCAdefaultOverride[$table.'.'] as $theF => $theV) {
if (isset($TCA[$table]['columns'][$theF])) {
$newRow[$theF]=$theV;
// Allowing userFuncs in userTS TCAdefaults, see issue #6635 for details
if (is_array($theV)) {
$theF = substr($theF, 0, -1); // Remove trailing dot from fieldname
$funcName = $theV['userFunc'];
$params = Array(
'table' => $table,
'field' => $theF,
'value' => $newRow[$theF],
'conf' => $theV['userFunc.']
);
$newRow[$theF] = t3lib_div::callUserFunction($funcName, $params, $this);
}
}
}
}
......
foreach($TCAPageTSOverride[$table.'.'] as $theF => $theV) {
if (isset($TCA[$table]['columns'][$theF])) {
$newRow[$theF]=$theV;
// Allowing userFuncs in pageTS TCAdefaults, see issue #6635 for details
if (is_array($theV)) {
$theF = substr($theF, 0, -1); // Remove trailing dot from fieldname
$funcName = $theV['userFunc'];
$params = Array(
'table' => $table,
'field' => $theF,
'value' => $newRow[$theF],
'conf' => $theV['userFunc.']
);
$newRow[$theF] = t3lib_div::callUserFunction($funcName, $params, $this);
}
}
}
}
(2-2/4)