Project

General

Profile

Bug #15769 » patch_class.t3lib_page.php.diff

Administrator Admin, 2006-03-14 09:13

View differences:

class.t3lib_page.php Tue Mar 14 08:58:31 2006
// Will try to overlay a record only if the sys_language_content value is larger that zero.
if ($sys_language_content>0) {
// Must be default language or [All], otherwise no overlaying:
if ($row[$TCA[$table]['ctrl']['languageField']]<=0) {
// Must NOT be default language or [All], otherwise no fallback-overlay:
if ($row[$TCA[$table]['ctrl']['languageField']] > 0) {
// Select overlay record:
// Select fallback record:
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
'*',
$table,
'pid='.intval($row['pid']).
' AND '.$TCA[$table]['ctrl']['languageField'].'='.intval($sys_language_content).
' AND '.$TCA[$table]['ctrl']['transOrigPointerField'].'='.intval($row['uid']).
' AND '.$TCA[$table]['ctrl']['languageField'].' IN (0,-1)'.
' AND uid='.intval($row['l18n_parent']).
$this->enableFields($table),
'',
'',
......
// Merge record content by traversing all fields:
if (is_array($olrow)) {
foreach($row as $fN => $fV) {
if ($fN!='uid' && $fN!='pid' && isset($olrow[$fN])) {
if ($fN!='uid' && $fN!='pid' && isset($row[$fN])) {
if ($GLOBALS['TSFE']->TCAcachedExtras[$table]['l10n_mode'][$fN]!='exclude'
&& ($GLOBALS['TSFE']->TCAcachedExtras[$table]['l10n_mode'][$fN]!='mergeIfNotBlank' || strcmp(trim($olrow[$fN]),''))) {
if (($GLOBALS['TSFE']->TCAcachedExtras[$table]['l10n_mode'][$fN]=='exclude'
|| $GLOBALS['TSFE']->TCAcachedExtras[$table]['l10n_mode'][$fN]=='mergeIfNotBlank') && !strcmp(trim($row[$fN]),'')) {
$row[$fN] = $olrow[$fN];
}
}
(1-1/2)