Project

General

Profile

Bug #17918 » bug_6953_trunkrevision_24646.patch

Administrator Admin, 2009-09-25 14:22

View differences:

class.ux_t3lib_db.php 2009-09-25 08:09:47.898295758 -0400
if (is_array($this->mapping[$t]['mapFieldNames']) && $this->mapping[$t]['mapFieldNames'][$sqlPartArray[$k]['field']]) {
$sqlPartArray[$k]['field'] = $this->mapping[$t]['mapFieldNames'][$sqlPartArray[$k]['field']];
}
// 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]];
}
}
// do we have a field name in the value?
// this is a very simplistic check, beware
if (!is_numeric($sqlPartArray[$k]['value'][0]) && !isset($sqlPartArray[$k]['value'][1])) {
(3-3/4)