Project

General

Profile

Bug #17918 » bug_6953_trunkrevision_4432.patch

Administrator Admin, 2009-02-12 14:52

View differences:

class.ux_t3lib_db.php
if ($sqlPartArray[$k]['table'] && $this->mapping[$sqlPartArray[$k]['table']]['mapTableName']) {
$sqlPartArray[$k]['table'] = $this->mapping[$sqlPartArray[$k]['table']]['mapTableName'];
}
// Map fieldnames in SQL-functions like MIN(), MAX() or SUM()
if ($this->mapping[$t]['mapFieldNames']) {
$fieldArrayFunc = explode('.',$sqlPartArray[$k]['func_content']);
if(count($fieldArrayFunc)==1 && isset($this->mapping[$t]['mapFieldNames'])){
$sqlPartArray[$k]['func_content.'][0]['func_content'] = $this->mapping[$t]['mapFieldNames'][$sqlPartArray[$k]['func_content']];
$sqlPartArray[$k]['func_content'] = $this->mapping[$t]['mapFieldNames'][$sqlPartArray[$k]['func_content']];
}
elseif(count($fieldArrayFunc)==2 && isset($this->mapping[$fieldArrayFunc[0]]['mapFieldNames'][$fieldArrayFunc[1]])){
$sqlPartArray[$k]['func_content.'][0]['func_content'] = $this->mapping[$fieldArrayFunc[0]]['mapTableName'].'.'.$this->mapping[$fieldArrayFunc[0]]['mapFieldNames'][$fieldArrayFunc[1]];
$sqlPartArray[$k]['func_content'] =$this->mapping[$fieldArrayFunc[0]]['mapTableName'].'.'.$this->mapping[$fieldArrayFunc[0]]['mapFieldNames'][$fieldArrayFunc[1]];
}
}
}
}
}
(2-2/4)