Project

General

Profile

Bug #14869 ยป class.t3lib_befunc.php.patch

Administrator Admin, 2005-07-18 13:47

View differences:

t3lib/class.t3lib_befunc.php (revision )
return $noTitle;
}
public static function sL() {
if (TYPO3_MODE == 'BE') {
return $GLOBALS['LANG']->sL($l);
} else {
return $GLOBALS['TSFE']->sL($l);
}
}
/**
* Returns a human readable output of a value from a record
* For instance a database record relation would be looked up to display the title-value of that record. A checkbox with a "1" value would be "Yes", etc.
......
switch ((string) $theColConf['type']) {
case 'radio':
$l = self::getLabelFromItemlist($table, $col, $value);
$l = $GLOBALS['LANG']->sL($l);
$l = self::sL($l);
break;
case 'select':
if ($theColConf['MM']) {
......
}
} else {
$l = self::getLabelFromItemlist($table, $col, $value);
$l = $GLOBALS['LANG']->sL($l);
$l = self::sL($l);
if ($theColConf['foreign_table'] && !$l && $TCA[$theColConf['foreign_table']]) {
if ($noRecordLookup) {
$l = $value;
......
$r = self::getRecordWSOL($theColConf['neg_foreign_table'], -$rVal);
}
if (is_array($r)) {
$lA[] = $GLOBALS['LANG']->sL($rVal > 0 ? $theColConf['foreign_table_prefix'] : $theColConf['neg_foreign_table_prefix']) . self::getRecordTitle($rVal > 0 ? $theColConf['foreign_table'] : $theColConf['neg_foreign_table'], $r, FALSE, $forceResult);
$lA[] = self::sL($rVal > 0 ? $theColConf['foreign_table_prefix'] : $theColConf['neg_foreign_table_prefix']) . self::getRecordTitle($rVal > 0 ? $theColConf['foreign_table'] : $theColConf['neg_foreign_table'], $r, FALSE, $forceResult);
} else {
$lA[] = $rVal ? '[' . $rVal . '!]' : '';
}
......
break;
case 'check':
if (!is_array($theColConf['items']) || count($theColConf['items']) == 1) {
$l = $value ? $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:yes') : $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:no');
$l = $value ? self::sL('LLL:EXT:lang/locallang_common.xml:yes') : self::sL('LLL:EXT:lang/locallang_common.xml:no');
} else {
$lA = Array();
foreach ($theColConf['items'] as $key => $val) {
if ($value & pow(2, $key)) {
$lA[] = $GLOBALS['LANG']->sL($val[0]);
$lA[] = self::sL($val[0]);
}
}
$l = implode(', ', $lA);
......
$l = self::date($value) .
' (' .
($GLOBALS['EXEC_TIME'] - $value > 0 ? '-' : '') .
self::calcAge(abs($GLOBALS['EXEC_TIME'] - $value), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')) .
self::calcAge(abs($GLOBALS['EXEC_TIME'] - $value), self::sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')) .
')';
} elseif (t3lib_div::inList($theColConf['eval'], 'time')) {
$l = self::time($value, FALSE);
    (1-1/1)