Project

General

Profile

Feature #23198 » 0015138-hideTranslations-v2.patch

Administrator Admin, 2010-07-20 10:45

View differences:

typo3/class.db_list.inc (Arbeitskopie)
var $modSharedTSconfig = array(); // Shared module configuration, used by localization features
var $pageRecord = array(); // Loaded with page record with version overlay if any.
var $hideTables = ''; // Tables which should not get listed
var $hideTranslation = ''; // Tabels which should not list their translations
var $tableTSconfigOverTCA = array(); //TSconfig which overwrites TCA-Settings
var $tablesCollapsed = array(); // Array of collapsed / uncollapsed tables in multi table view
......
function makeQueryArray($table, $id, $addWhere='', $fieldList='*') {
global $TCA, $TYPO3_CONF_VARS;
if (in_array($table, t3lib_div::trimExplode(',', $this->hideTranslations)) || strcmp($this->hideTranslation, '*')==0) {
$hideTranslations = TRUE;
}
$hookObjectsArr = array();
if (is_array ($TYPO3_CONF_VARS['SC_OPTIONS']['typo3/class.db_list.inc']['makeQueryArray'])) {
foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['typo3/class.db_list.inc']['makeQueryArray'] as $classRef) {
......
'LIMIT' => $limit
);
if ($hideTranslations && $TCA[$table]['ctrl']['languageField']) {
$queryParts['WHERE'] .= ' AND ' . $TCA[$table]['ctrl']['languageField'] . '=0 ' ;
}
// Apply hook as requested in http://bugs.typo3.org/view.php?id=4361
foreach ($hookObjectsArr as $hookObj) {
if (method_exists($hookObj, 'makeQueryArray_post')) {
typo3/sysext/list/mod1/db_list.php (Arbeitskopie)
$dblist->disableSingleTableView = $this->modTSconfig['properties']['disableSingleTableView'];
$dblist->listOnlyInSingleTableMode = $this->modTSconfig['properties']['listOnlyInSingleTableView'];
$dblist->hideTables = $this->modTSconfig['properties']['hideTables'];
$dblist->hideTranslation = $this->modTSconfig['properties']['hideTranslation'];
$dblist->tableTSconfigOverTCA = $this->modTSconfig['properties']['table.'];
$dblist->clickTitleMode = $this->modTSconfig['properties']['clickTitleMode'];
$dblist->alternateBgColors=$this->modTSconfig['properties']['alternateBgColors']?1:0;
(2-2/3)