Project

General

Profile

Feature #14559 ยป t3lib_befunc_getRecordTitle.diff

Administrator Admin, 2006-12-14 16:55

View differences:

t3lib/class.t3lib_befunc.php Thu Dec 14 14:18:37 2006
function getRecordTitle($table,$row,$prep=0) {
global $TCA;
if (is_array($TCA[$table])) {
$t = $row[$TCA[$table]['ctrl']['label']];
$t = t3lib_BEfunc::getProcessedValueExtra($table,$TCA[$table]['ctrl']['label'],$row[$TCA[$table]['ctrl']['label']]);
if ($TCA[$table]['ctrl']['label_alt'] && ($TCA[$table]['ctrl']['label_alt_force'] || !strcmp($t,''))) {
$altFields=t3lib_div::trimExplode(',',$TCA[$table]['ctrl']['label_alt'],1);
$tA=array();
$tA[]=$t;
while(list(,$fN)=each($altFields)) {
$t = $tA[] = trim(strip_tags($row[$fN]));
$t = $tA[] = trim(strip_tags(t3lib_BEfunc::getProcessedValueExtra($table,$fN,$row[$fN])));
if (strcmp($t,'') && !$TCA[$table]['ctrl']['label_alt_force']) break;
}
if ($TCA[$table]['ctrl']['label_alt_force']) $t=implode(', ',$tA);
    (1-1/1)