Project

General

Profile

Bug #22640 » bug_0014372.diff

Administrator Admin, 2010-05-17 17:21

View differences:

class.ux_t3lib_db.php (working copy)
$tables = $this->SQLparser->parseFromTables($from_table);
$defaultTable = $tables[0]['table'];
foreach ($tables as $k => $v) {
if(is_array($this->mapping[$v['table']]['mapFieldNames'])) {
$this->mapping[$v['as']]['mapFieldNames'] = &$this->mapping[$v['table']]['mapFieldNames'];
}
if ($this->mapping[$v['table']]['mapTableName']) {
$tables[$k]['table'] = $this->mapping[$v['table']]['mapTableName'];
}
// Mapping JOINS
if (is_array($v['JOIN'])) {
foreach($v['JOIN'] as $joinCnt => $join) {
// Mapping withTable with alias of the JOIN
if(is_array($this->mapping[$join['withTable']]['mapFieldNames'])) {
$this->mapping[$join['as']]['mapFieldNames'] = &$this->mapping[$join['withTable']]['mapFieldNames'];
}
// Mapping withTable of the JOIN
if ($this->mapping[$join['withTable']]['mapTableName']) {
$tables[$k]['JOIN'][$joinCnt]['withTable'] = $this->mapping[$join['withTable']]['mapTableName'];
(1-1/3)