Bug #17698 ยป db_list_hook.patch
typo3/class.db_list_extra.inc (working copy) | ||
---|---|---|
* @return string HTML table with the listing for the record.
|
||
*/
|
||
function getTable($table,$id,$rowlist) {
|
||
global $TCA;
|
||
global $TCA, $TYPO3_CONF_VARS;
|
||
// Loading all TCA details for this table:
|
||
t3lib_div::loadTCA($table);
|
||
... | ... | |
$selectFields = array_intersect($selectFields,$this->makeFieldList($table,1)); // 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.
|
||
// DB-List Query-Hook
|
||
if (is_array ($TYPO3_CONF_VARS['SC_OPTIONS']['typo3/class.db_list_extra.inc']['query'])) {
|
||
foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['typo3/class.db_list_extra.inc']['query'] as $classRef) {
|
||
$hookObj = &t3lib_div::getUserObj($classRef);
|
||
if (method_exists($hookObj,'getDBlistQuery')) {
|
||
$hookObj->getDBlistQuery($table,$id,$addWhere,$selFieldList,$this);
|
||
}
|
||
}
|
||
}
|
||
// Create the SQL query for selecting the elements in the listing:
|
||
$queryParts = $this->makeQueryArray($table, $id,$addWhere,$selFieldList); // (API function from class.db_list.inc)
|
||
$this->setTotalItems($queryParts); // Finding the total amount of records on the page (API function from class.db_list.inc)
|