class.t3lib_tceforms_inline.php.patch

Administrator Admin, 2010-01-18 16:34

Download (1.22 KB)

View differences:

class.t3lib_tceforms_inline.php 2010-01-18 16:26:00.000000000 +0100
723 723
					$this->inlineFirstPid,
724 724
					$comboConfig['foreign_table']
725 725
				);
726
				// set language for new records to the same as the given record
727
				$relationLanguageField = $GLOBALS['TCA'][$config['foreign_table']]['ctrl']['languageField'];
728
				$recordLanguageField = $GLOBALS['TCA'][$comboConfig['foreign_table']]['ctrl']['languageField'];
729
				if ($rec[$relationLanguageField]>0) {
730
					$comboRecord[$recordLanguageField] = $rec[$relationLanguageField];
731
				}
732
				
726 733
				$isNewRecord = true;
727 734
			}
728 735

  
......
1136 1143
				$parentRecord = $this->getRecord(0, $parent['table'], $parent['uid']);
1137 1144
				$parentLanguageField = $GLOBALS['TCA'][$parent['table']]['ctrl']['languageField'];
1138 1145
				$childLanguageField = $GLOBALS['TCA'][$current['table']]['ctrl']['languageField'];
1139
				if ($parentRecord[$languageField]>0) {
1140
					$record[$childLanguageField] = $parentRecord[$languageField];
1146
				if ($parentRecord[$parentLanguageField]>0) {
1147
					$record[$childLanguageField] = $parentRecord[$parentLanguageField];
1141 1148
				}
1142 1149
			}
1143 1150