Bug #16455 » dbList_lang.patch
TYPO3core_testing/typo3/class.db_list_extra.inc 2006-08-11 19:46:52.000000000 +0200 | ||
---|---|---|
var $dontShowClipControlPanels=FALSE; // If true, will disable the rendering of clipboard + control panels.
|
||
var $showClipboard=FALSE; // If true, will show the clipboard in the field list.
|
||
var $noControlPanels = FALSE; // If true, will DISABLE all control panels in lists. (Takes precedence)
|
||
var $noControlPanels = FALSE; // If true, will DISABLE all control panels in lists. (Takes precedence)
|
||
var $clickMenuEnabled = TRUE; // If true, clickmenus will be rendered
|
||
... | ... | |
$this->fieldArray[] = '_LOCALIZATION_b';
|
||
$addWhere.=' AND (
|
||
'.$TCA[$table]['ctrl']['languageField'].'<=0
|
||
OR
|
||
'.$TCA[$table]['ctrl']['transOrigPointerField'].' = 0
|
||
OR
|
||
'.$TCA[$table]['ctrl']['transOrigPointerField'].'=0
|
||
)';
|
||
}
|
||
if (!t3lib_div::inList($rowlist,'_CONTROL_')) {
|
||
... | ... | |
$iOut = '';
|
||
$cc = 0;
|
||
foreach($accRows as $row) {
|
||
$alreadyShownRecords = array(); // find records which are orphaned (localized records which don't have an unlocalized version) }
|
||
foreach($accRows as $row) {
|
||
$alreadyShownRecords[] = $row['uid'];
|
||
// Forward/Backwards navigation links:
|
||
list($flag,$code) = $this->fwd_rwd_nav($table);
|
||
$iOut.=$code;
|
||
... | ... | |
if (is_array($translations)) {
|
||
foreach($translations as $lRow) {
|
||
if ($GLOBALS['BE_USER']->checkLanguageAccess($lRow[$TCA[$table]['ctrl']['languageField']])) {
|
||
$alreadyShownRecords[] = $lRow['uid'];
|
||
$iOut.=$this->renderListRow($table,$lRow,$cc,$titleCol,$thumbsCol,18);
|
||
}
|
||
}
|
||
... | ... | |
$this->eCounter++;
|
||
}
|
||
// Check if there are orphaned records
|
||
if ($this->localizationView && $l10nEnabled) {
|
||
if(!count($listOfLocalisedRecords)) // prevent an empty NOT IN () clause
|
||
$alreadyShownRecords[] = -1;
|
||
$orphanedRecords = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
|
||
$selFieldList,
|
||
$table,
|
||
'pid='.$row['pid'].
|
||
' AND '.$TCA[$table]['ctrl']['languageField'].'>0'.
|
||
' AND uid NOT IN ('.implode(',', $alreadyShownRecords).')'.
|
||
t3lib_BEfunc::deleteClause($table).
|
||
t3lib_BEfunc::versioningPlaceholderClause($table)
|
||
);
|
||
// Display each orphaned record
|
||
if (is_array($orphanedRecords)) {
|
||
foreach($orphanedRecords as $lRow) {
|
||
if ($GLOBALS['BE_USER']->checkLanguageAccess($lRow[$TCA[$table]['ctrl']['languageField']])) {
|
||
$iOut.=$this->renderListRow($table,$lRow,$cc,$titleCol,$thumbsCol,0,1);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
// The header row for the table is now created:
|
||
$out.=$this->renderListHeader($table,$currentIdList);
|
||
}
|
||
... | ... | |
* @param string Table field (column) where header value is found
|
||
* @param string Table field (column) where (possible) thumbnails can be found
|
||
* @param integer Indent from left.
|
||
* @param boolean set to true if the record is orphaned
|
||
* @return string Table row for the element
|
||
* @access private
|
||
* @see getTable()
|
||
*/
|
||
function renderListRow($table,$row,$cc,$titleCol,$thumbsCol,$indent=0) {
|
||
function renderListRow($table,$row,$cc,$titleCol,$thumbsCol,$indent=0,$orphaned=0) {
|
||
global $LANG;
|
||
$iOut = '';
|
||
if (strlen($this->searchString)) { // If in search mode, make sure the preview will show the correct page
|
||
... | ... | |
// Overriding with versions background color if any:
|
||
$row_bgColor = $row['_CSSCLASS'] ? ' class="'.$row['_CSSCLASS'].'"' : $row_bgColor;
|
||
// Overriding the color if orphaned
|
||
if ($orphaned)
|
||
$row_bgColor = 'class="bgColor6"';
|
||
// Initialization
|
||
$alttext = t3lib_BEfunc::getRecordIconAltText($row,$table);
|
||
$recTitle = t3lib_BEfunc::getRecordTitle($table,$row);
|
||
... | ... | |
$recTitle = t3lib_BEfunc::getProcessedValueExtra($table,$fCol,$row[$fCol],$GLOBALS['BE_USER']->uc['titleLen'],$row['uid']);
|
||
}
|
||
$theData[$fCol] = $this->linkWrapItems($table,$row['uid'],$recTitle,$row);
|
||
if ($orphaned)
|
||
$theData[$fCol] = '<img'.t3lib_iconWorks::skinImg('','gfx/icon_warning2.gif','width="18" height="16"').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.xml:mess.translatedOrphanedRecord',1).'">' . $theData[$fCol];
|
||
} elseif ($fCol=='pid') {
|
||
$theData[$fCol]=$row[$fCol];
|
||
} elseif ($fCol=='_PATH_') {
|
TYPO3core_testing/typo3/sysext/lang/locallang_core.xml 2006-08-11 19:44:11.000000000 +0200 | ||
---|---|---|
<label index="mess.copycb_after">Copy all elements (%s) from the clipboard to the position after "%s"?</label>
|
||
<label index="mess.movecb_into">Move all elements (%s) from the clipboard into "%s"?</label>
|
||
<label index="mess.movecb_after">Move all elements (%s) from the clipboard to the position after "%s"?</label>
|
||
<label index="mess.translatedOrphanedRecord">The original to this translated record is missing. Please check if this is intended.</label>
|
||
<label index="rm.menu">[menu]</label>
|
||
<label index="rm.saveDoc">Save document</label>
|
||
<label index="rm.saveDocShow">Save document and view page</label>
|