Project

General

Profile

Bug #21701 ยป class.ux_sc_show_item.php

Administrator Admin, 2009-11-26 17:00

 
<?php
/**
* Bug fix for bug 12780
*/
class ux_SC_show_item extends SC_show_item {
/**
* Main function. Will generate the information to display for the item set internally.
*
* @return void
*/
function renderDBInfo() {
global $TCA;

// Print header, path etc:
$code = $this->doc->getHeader($this->table,$this->row,$this->pageinfo['_thePath'],1).'<br />';
$this->content.= $this->doc->section('',$code);

// Initialize variables:
$tableRows = Array();
$i = 0;

// Traverse the list of fields to display for the record:
$fieldList = t3lib_div::trimExplode(',',$TCA[$this->table]['interface']['showRecordFieldList'],1);
foreach($fieldList as $name) {
$name = trim($name);
if ($TCA[$this->table]['columns'][$name]) {
if (!$TCA[$this->table]['columns'][$name]['exclude'] || $GLOBALS['BE_USER']->check('non_exclude_fields',$this->table.':'.$name)) {
$i++;
$tableRows[] = '
<tr>
<td class="bgColor5">'.$GLOBALS['LANG']->sL(t3lib_BEfunc::getItemLabel($this->table,$name),1).'</td>
<td class="bgColor4">'.htmlspecialchars(t3lib_BEfunc::getProcessedValue($this->table,$name,$this->row[$name],0,0,0,$this->row['uid'])).'</td>
</tr>';
}
}
}

// Create table from the information:
$tableCode = '
<table border="0" cellpadding="1" cellspacing="1" id="typo3-showitem">
'.implode('',$tableRows).'
</table>';
$this->content.=$this->doc->section('',$tableCode);
$this->content.=$this->doc->divider(2);

// Add path and table information in the bottom:
$code = '';
$code.= $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.path').': '.t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'],-48).'<br />';
$code.= $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.table').': '.$GLOBALS['LANG']->sL($TCA[$this->table]['ctrl']['title']).' ('.$this->table.') - UID: '.$this->uid.'<br />';
$this->content.= $this->doc->section('', $code);

// References:
$this->content.= $this->doc->section($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.referencesToThisItem'),$this->makeRef($this->table,$this->row['uid']));

// References:
$this->content.= $this->doc->section($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.referencesFromThisItem'),$this->makeRefFrom($this->table,$this->row['uid']));
}
}
?>
    (1-1/1)