Project

General

Profile

Bug #17610 » 6357.patch

Administrator Admin, 2010-09-17 23:02

View differences:

typo3/alt_doc.php (Arbeitskopie)
$fetchFields = 'uid,'.$languageField.','.$transOrigPointerField;
// get record in current language
$rowCurrent = t3lib_befunc::getLiveVersionOfRecord($table, $uid, $fetchFields);
$rowCurrent = t3lib_BEfunc::getLiveVersionOfRecord($table, $uid);
if (!is_array($rowCurrent)) {
$rowCurrent = t3lib_befunc::getRecord($table, $uid, $fetchFields);
$rowCurrent = t3lib_BEfunc::getRecord($table, $uid);
}
$currentLanguage = $rowCurrent[$languageField];
......
if ($currentLanguage>-1) { // Disabled for records with [all] language!
// get record in default language if needed
if ($currentLanguage) {
$rowsByLang[0] = t3lib_befunc::getLiveVersionOfRecord($table, $rowCurrent[$transOrigPointerField], $fetchFields);
$rowsByLang[0] = t3lib_BEfunc::getLiveVersionOfRecord($table, $rowCurrent[$transOrigPointerField]);
if (!is_array($rowsByLang[0])) {
$rowsByLang[0] = t3lib_befunc::getRecord($table, $rowCurrent[$transOrigPointerField], $fetchFields);
$rowsByLang[0] = t3lib_BEfunc::getRecord($table, $rowCurrent[$transOrigPointerField]);
}
} else {
$rowsByLang[0] = $rowCurrent;
......
$newTranslation = isset($rowsByLang[$lang['uid']]) ? '' : ' ['.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.new',1).']';
// create url for creating a localized record
if($newTranslation) {
if ($newTranslation) {
$uidOfDefaultLanguage = ($rowsByLang[0]['pid'] < 0 ? $rowsByLang[0]['t3ver_oid'] : $rowsByLang[0]['uid']);
$href = $this->doc->issueCommand(
'&cmd['.$table.']['.$rowsByLang[0]['uid'].'][localize]='.$lang['uid'],
$this->backPath.'alt_doc.php?justLocalized='.rawurlencode($table.':'.$rowsByLang[0]['uid'].':'.$lang['uid']).'&returnUrl='.rawurlencode($this->retUrl)
'&cmd[' . $table . '][' . $uidOfDefaultLanguage . '][localize]=' . $lang['uid'],
$this->backPath . 'alt_doc.php?justLocalized=' . rawurlencode($table . ':' . $uidOfDefaultLanguage . ':' . $lang['uid']) . '&returnUrl=' . rawurlencode($this->retUrl)
);
// create edit url
(2-2/2)