Project

General

Profile

Bug #17961 » notcacolumnserror.diff

Administrator Admin, 2007-12-31 14:09

View differences:

typo3/class.db_list.inc (copie de travail)
$fieldListArr = array();
// Check table:
if (is_array($TCA[$table])) {
if (is_array($TCA[$table]) && isset($TCA[$table]['columns']) && is_array($TCA[$table]['columns'])) {
t3lib_div::loadTCA($table);
// Traverse configured columns and add them to field array, if available for user.
typo3/class.db_list_extra.inc (copie de travail)
// Loading all TCA details for this table:
t3lib_div::loadTCA($table);
$errorOut = '';
// Init
$addWhere = '';
......
$selectFields = array_merge($selectFields,t3lib_div::trimExplode(',',$TCA[$table]['ctrl']['label_alt'],1));
}
$selectFields = array_unique($selectFields); // Unique list!
$selectFields = array_intersect($selectFields,$this->makeFieldList($table,1)); // Making sure that the fields in the field-list ARE in the field-list from TCA!
$fieldListFields = $this->makeFieldList($table,1);
if (!count($fieldListFields)) {
$errorOut = 'Warning: no fields for table '.$table.' have been found. Is $TCA[\''.$table.'\'][\'columns\'] missing?<br />';
}
$selectFields = array_intersect($selectFields,$fieldListFields); // Making sure that the fields in the field-list ARE in the field-list from TCA!
$selFieldList = implode(',',$selectFields); // implode it into a list of fields for the SQL-statement.
/**
......
// Counter of total rows incremented:
$this->eCounter++;
}
// The header row for the table is now created:
$out.=$this->renderListHeader($table,$currentIdList);
}
// The list of records is added after the header:
$out.=$iOut;
......
if ($this->csvOutput) $this->outputCSV($table); // This ends the page with exit.
}
$out = $errorOut.$out;
// Return content:
return $out;
}
(1-1/2)