Bug #17610 » alt_doc.php_r7-r8.diff
Revision 8 | ||
---|---|---|
$fetchFields = 'uid,'.$languageField.','.$transOrigPointerField;
|
||
// get record in current language
|
||
$rowCurrent = t3lib_befunc::getRecord($table, $uid, $fetchFields);
|
||
$rowCurrent = t3lib_befunc::getRecord($table, $uid/*, $fetchFields*/);
|
||
$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::getRecord($table, $rowCurrent[$transOrigPointerField], $fetchFields);
|
||
$rowsByLang[0] = t3lib_befunc::getRecord($table, $rowCurrent[$transOrigPointerField]/*, $fetchFields*/);
|
||
} else {
|
||
$rowsByLang[0] = $rowCurrent;
|
||
}
|
||
... | ... | |
foreach ($translations as $row) {
|
||
$rowsByLang[$row[$languageField]] = $row;
|
||
}
|
||
|
||
|
||
$langSelItems=array();
|
||
foreach ($langRows as $lang) {
|
||
... | ... | |
// create url for creating a localized record
|
||
if($newTranslation) {
|
||
$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.']['.($rowsByLang[0]['pid'] < 0 ? $rowsByLang[0]['t3ver_oid'] : $rowsByLang[0]['uid']).'][localize]='.$lang['uid'],
|
||
$this->backPath.'alt_doc.php?justLocalized='.rawurlencode($table.':'.($rowsByLang[0]['pid'] < 0 ? $rowsByLang[0]['t3ver_oid'] : $rowsByLang[0]['uid']).':'.$lang['uid']).'&returnUrl='.rawurlencode($this->retUrl)
|
||
);
|
||
// create edit url
|