Project

General

Profile

Bug #19114 » bug_8986.diff

Administrator Admin, 2009-04-06 14:42

View differences:

typo3/sysext/cms/tslib/class.tslib_content.php (Revision 13032)
// Versioning preview:
$GLOBALS['TSFE']->sys_page->versionOL($conf['table'],$row,TRUE);
// Language Overlay:
// Language overlay:
if (is_array($row) && $GLOBALS['TSFE']->sys_language_contentOL) {
$row = $GLOBALS['TSFE']->sys_page->getRecordOverlay($conf['table'],$row,$GLOBALS['TSFE']->sys_language_content,$GLOBALS['TSFE']->sys_language_contentOL);
$this->languageOverlay($conf['table'], $row);
}
if (is_array($row)) { // Might be unset in the sys_language_contentOL
......
}
/**
* Perform language overlay
*
* @param string Table name
* @param array Record to be overlayed
* @return void
*/
function languageOverlay($table, &$row) {
list($sys_language_mode,$language_list) = t3lib_div::trimExplode(';', $GLOBALS['TSFE']->config['config']['sys_language_mode']);
if ($sys_language_mode === 'content_fallback' && $GLOBALS['TSFE']->sys_language_contentOL !== 'hideNonTranslated') {
$tmpRow = $GLOBALS['TSFE']->sys_page->getRecordOverlay($table,$row,$GLOBALS['TSFE']->sys_language_content,'hideNonTranslated');
if (empty($tmpRow)) {
foreach (t3lib_div::intExplode(',', $language_list) as $sys_language_content) {
$tmpRow = $GLOBALS['TSFE']->sys_page->getRecordOverlay($table,$row,$sys_language_content,'hideNonTranslated');
if ($tmpRow) {
break;
}
}
}
$row = $tmpRow;
unset ($tmpRow);
} else {
$row = $GLOBALS['TSFE']->sys_page->getRecordOverlay($table,$row,$GLOBALS['TSFE']->sys_language_content,$GLOBALS['TSFE']->sys_language_contentOL);
}
}
/**
* Rendering the cObject, RECORDS
*
* @param array Array of TypoScript properties
......
// Language Overlay:
if (is_array($row) && $GLOBALS['TSFE']->sys_language_contentOL) {
$row = $GLOBALS['TSFE']->sys_page->getRecordOverlay($val['table'],$row,$GLOBALS['TSFE']->sys_language_content,$GLOBALS['TSFE']->sys_language_contentOL);
$this->languageOverlay($val['table'],$row);
}
if (is_array($row)) { // Might be unset in the content overlay things...
(1-1/4)