Bug #24958 » 17486_4-4.patch
typo3/alt_doc.php (revision ) | ||
---|---|---|
// CLOSE button:
|
||
$buttons['close'] = '<a href="#" onclick="document.editform.closeDoc.value=1; document.editform.submit(); return false;" title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:rm.closeDoc', TRUE) . '">' .
|
||
t3lib_iconWorks::getSpriteIcon('actions-document-close') .
|
||
t3lib_iconWorks::getSpriteIcon('actions-document-close') .
|
||
'</a>';
|
||
... | ... | |
if ($this->firstEl['deleteAccess'] && !$TCA[$this->firstEl['table']]['ctrl']['readOnly'] && !$this->getNewIconMode($this->firstEl['table'],'disableDelete')) {
|
||
$aOnClick = 'return deleteRecord(\''.$this->firstEl['table'].'\',\''.$this->firstEl['uid'].'\',unescape(\''.rawurlencode($this->retUrl).'\'));';
|
||
$buttons['delete'] = '<a href="#" onclick="'.htmlspecialchars($aOnClick).'" title="' . $LANG->getLL('deleteItem', TRUE) . '">' .
|
||
t3lib_iconWorks::getSpriteIcon('actions-edit-delete') .
|
||
t3lib_iconWorks::getSpriteIcon('actions-edit-delete') .
|
||
'</a>';
|
||
}
|
||
... | ... | |
$aOnClick = 'window.location.href=\'show_rechis.php?element='.rawurlencode($this->firstEl['table'].':'.$this->firstEl['uid']).'&revert=ALL_FIELDS&sumUp=-1&returnUrl='.rawurlencode($this->R_URI).'\'; return false;';
|
||
$buttons['undo'] = '<a href="#" onclick="'.htmlspecialchars($aOnClick).'"'.
|
||
' title="' . htmlspecialchars(sprintf($LANG->getLL('undoLastChange'), t3lib_BEfunc::calcAge($GLOBALS['EXEC_TIME'] - $undoButtonR['tstamp'], $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')))) . '">' .
|
||
t3lib_iconWorks::getSpriteIcon('actions-edit-undo') .
|
||
t3lib_iconWorks::getSpriteIcon('actions-edit-undo') .
|
||
'</a>';
|
||
}
|
||
if ($this->getNewIconMode($this->firstEl['table'],'showHistory')) {
|
||
$aOnClick = 'window.location.href=\'show_rechis.php?element='.rawurlencode($this->firstEl['table'].':'.$this->firstEl['uid']).'&returnUrl='.rawurlencode($this->R_URI).'\'; return false;';
|
||
$buttons['history'] = '<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.
|
||
t3lib_iconWorks::getSpriteIcon('actions-document-history-open') .
|
||
t3lib_iconWorks::getSpriteIcon('actions-document-history-open') .
|
||
'</a>';
|
||
}
|
||
... | ... | |
// get record in current language
|
||
$rowCurrent = t3lib_befunc::getLiveVersionOfRecord($table, $uid, $fetchFields);
|
||
if (!is_array($rowCurrent)) {
|
||
$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) {
|
||
if ($currentLanguage && $rowCurrent[$transOrigPointerField]) {
|
||
$rowsByLang[0] = t3lib_befunc::getLiveVersionOfRecord($table, $rowCurrent[$transOrigPointerField], $fetchFields);
|
||
if (!is_array($rowsByLang[0])) {
|
||
$rowsByLang[0] = t3lib_befunc::getRecord($table, $rowCurrent[$transOrigPointerField], $fetchFields);
|
||
$rowsByLang[0] = t3lib_befunc::getRecord($table, $rowCurrent[$transOrigPointerField], $fetchFields);
|
||
}
|
||
} else {
|
||
$rowsByLang[0] = $rowCurrent;
|
||
$rowsByLang[$rowCurrent[$languageField]] = $rowCurrent;
|
||
}
|
||
if ($rowCurrent[$transOrigPointerField] || $currentLanguage === '0') {
|
||
// get record in other languages to see what's already available
|
||
$translations = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
|
||
$fetchFields,
|
||
$table,
|
||
'pid='.intval($pid).
|
||
' AND '.$languageField.'>0'.
|
||
' AND '.$transOrigPointerField.'='.intval($rowsByLang[0]['uid']).
|
||
t3lib_BEfunc::deleteClause($table).
|
||
t3lib_BEfunc::versioningPlaceholderClause($table)
|
||
);
|
||
foreach ($translations as $row) {
|
||
$rowsByLang[$row[$languageField]] = $row;
|
||
}
|
||
// get record in other languages to see what's already available
|
||
$translations = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
|
||
$fetchFields,
|
||
$table,
|
||
'pid='.intval($pid).
|
||
' AND '.$languageField.'>0'.
|
||
' AND '.$transOrigPointerField.'='.intval($rowsByLang[0]['uid']).
|
||
t3lib_BEfunc::deleteClause($table).
|
||
t3lib_BEfunc::versioningPlaceholderClause($table)
|
||
);
|
||
foreach ($translations as $row) {
|
||
$rowsByLang[$row[$languageField]] = $row;
|
||
}
|
||
}
|
||
$langSelItems=array();
|
||
foreach ($langRows as $lang) {
|
||
... | ... | |
$SOBE->main();
|
||
$SOBE->printContent();
|
||
?>
|
||
?>
|