Bug #20439 » 11108.diff
typo3/sysext/dbal/class.ux_t3lib_db.php (working copy) | ||
---|---|---|
$select_fields = $this->SQLparser->parseFieldList($select_fields);
|
||
foreach($select_fields as $k => $v) {
|
||
if($select_fields[$k]['field'] != '' && $select_fields[$k]['field'] != '*') {
|
||
$select_fields[$k]['field'] = $this->handlerInstance[$this->lastHandlerKey]->nameQuote.$select_fields[$k]['field'].$this->handlerInstance[$this->lastHandlerKey]->nameQuote;
|
||
$select_fields[$k]['field'] = $this->handlerInstance[$this->lastHandlerKey]->DataDictionary->NameQuote($select_fields[$k]['field']);
|
||
}
|
||
if($select_fields[$k]['table'] != '') {
|
||
$select_fields[$k]['table'] = $this->handlerInstance[$this->lastHandlerKey]->nameQuote.$select_fields[$k]['table'].$this->handlerInstance[$this->lastHandlerKey]->nameQuote;
|
||
$select_fields[$k]['table'] = $this->handlerInstance[$this->lastHandlerKey]->DataDictionary->NameQuote($select_fields[$k]['table']);
|
||
}
|
||
if($select_fields[$k]['as'] != '') {
|
||
$select_fields[$k]['as'] = $this->handlerInstance[$this->lastHandlerKey]->nameQuote.$select_fields[$k]['as'].$this->handlerInstance[$this->lastHandlerKey]->nameQuote;
|
||
$select_fields[$k]['as'] = $this->handlerInstance[$this->lastHandlerKey]->DataDictionary->NameQuote($select_fields[$k]['as']);
|
||
}
|
||
if(isset($select_fields[$k]['func_content.']) && $select_fields[$k]['func_content.'][0]['func_content'] != '*'){
|
||
$select_fields[$k]['func_content.'][0]['func_content'] = $this->quoteFieldNames($select_fields[$k]['func_content.'][0]['func_content']);
|
||
... | ... | |
$from_table = $this->SQLparser->parseFromTables($from_table);
|
||
foreach($from_table as $k => $v) {
|
||
$from_table[$k]['table'] = $this->handlerInstance[$this->lastHandlerKey]->nameQuote.$from_table[$k]['table'].$this->handlerInstance[$this->lastHandlerKey]->nameQuote;
|
||
$from_table[$k]['table'] = $this->handlerInstance[$this->lastHandlerKey]->DataDictionary->NameQuote($from_table[$k]['table']);
|
||
if($from_table[$k]['as'] != '') {
|
||
$from_table[$k]['as'] = $this->handlerInstance[$this->lastHandlerKey]->nameQuote.$from_table[$k]['as'].$this->handlerInstance[$this->lastHandlerKey]->nameQuote;
|
||
$from_table[$k]['as'] = $this->handlerInstance[$this->lastHandlerKey]->DataDictionary->NameQuote($from_table[$k]['as']);
|
||
}
|
||
if (is_array($v['JOIN'])) {
|
||
$from_table[$k]['JOIN']['withTable'] = $this->handlerInstance[$this->lastHandlerKey]->nameQuote.$from_table[$k]['JOIN']['withTable'].$this->handlerInstance[$this->lastHandlerKey]->nameQuote;
|
||
$from_table[$k]['JOIN']['ON'][0]['table'] = ($from_table[$k]['JOIN']['ON'][0]['table']) ? $this->handlerInstance[$this->lastHandlerKey]->nameQuote.$from_table[$k]['JOIN']['ON'][0]['table'].$this->handlerInstance[$this->lastHandlerKey]->nameQuote : '';
|
||
$from_table[$k]['JOIN']['ON'][0]['field'] = $this->handlerInstance[$this->lastHandlerKey]->nameQuote.$from_table[$k]['JOIN']['ON'][0]['field'].$this->handlerInstance[$this->lastHandlerKey]->nameQuote;
|
||
$from_table[$k]['JOIN']['ON'][1]['table'] = ($from_table[$k]['JOIN']['ON'][1]['table']) ? $this->handlerInstance[$this->lastHandlerKey]->nameQuote.$from_table[$k]['JOIN']['ON'][1]['table'].$this->handlerInstance[$this->lastHandlerKey]->nameQuote : '';
|
||
$from_table[$k]['JOIN']['ON'][1]['field'] = $this->handlerInstance[$this->lastHandlerKey]->nameQuote.$from_table[$k]['JOIN']['ON'][1]['field'].$this->handlerInstance[$this->lastHandlerKey]->nameQuote;
|
||
$from_table[$k]['JOIN']['withTable'] = $this->handlerInstance[$this->lastHandlerKey]->DataDictionary->NameQuote($from_table[$k]['JOIN']['withTable']);
|
||
$from_table[$k]['JOIN']['ON'][0]['table'] = ($from_table[$k]['JOIN']['ON'][0]['table']) ? $this->handlerInstance[$this->lastHandlerKey]->DataDictionary->NameQuote($from_table[$k]['JOIN']['ON'][0]['table']) : '';
|
||
$from_table[$k]['JOIN']['ON'][0]['field'] = $this->handlerInstance[$this->lastHandlerKey]->DataDictionary->NameQuote($from_table[$k]['JOIN']['ON'][0]['field']);
|
||
$from_table[$k]['JOIN']['ON'][1]['table'] = ($from_table[$k]['JOIN']['ON'][1]['table']) ? $this->handlerInstance[$this->lastHandlerKey]->DataDictionary->NameQuote($from_table[$k]['JOIN']['ON'][1]['table']) : '';
|
||
$from_table[$k]['JOIN']['ON'][1]['field'] = $this->handlerInstance[$this->lastHandlerKey]->DataDictionary->NameQuote($from_table[$k]['JOIN']['ON'][1]['field']);
|
||
}
|
||
}
|
||
return $this->SQLparser->compileFromTables($from_table);
|
||
... | ... | |
$where_clause[$k]['sub'] = $this->_quoteWhereClause($where_clause[$k]['sub']);
|
||
} else {
|
||
if($where_clause[$k]['table'] != '') {
|
||
$where_clause[$k]['table'] = $this->handlerInstance[$this->lastHandlerKey]->nameQuote.$where_clause[$k]['table'].$this->handlerInstance[$this->lastHandlerKey]->nameQuote;
|
||
$where_clause[$k]['table'] = $this->handlerInstance[$this->lastHandlerKey]->DataDictionary->NameQuote($where_clause[$k]['table']);
|
||
}
|
||
if(!is_numeric($where_clause[$k]['field'])) {
|
||
$where_clause[$k]['field'] = $this->handlerInstance[$this->lastHandlerKey]->nameQuote.$where_clause[$k]['field'].$this->handlerInstance[$this->lastHandlerKey]->nameQuote;
|
||
$where_clause[$k]['field'] = $this->handlerInstance[$this->lastHandlerKey]->DataDictionary->NameQuote($where_clause[$k]['field']);
|
||
}
|
||
}
|
||
if ($where_clause[$k]['comparator']) {
|
||
... | ... | |
$groupBy = $this->SQLparser->parseFieldList($groupBy);
|
||
foreach($groupBy as $k => $v) {
|
||
$groupBy[$k]['field'] = $this->handlerInstance[$this->lastHandlerKey]->nameQuote.$groupBy[$k]['field'].$this->handlerInstance[$this->lastHandlerKey]->nameQuote;
|
||
$groupBy[$k]['field'] = $this->handlerInstance[$this->lastHandlerKey]->DataDictionary->NameQuote($groupBy[$k]['field']);
|
||
if($groupBy[$k]['table'] != '') {
|
||
$groupBy[$k]['table'] = $this->handlerInstance[$this->lastHandlerKey]->nameQuote.$groupBy[$k]['table'].$this->handlerInstance[$this->lastHandlerKey]->nameQuote;
|
||
$groupBy[$k]['table'] = $this->handlerInstance[$this->lastHandlerKey]->DataDictionary->NameQuote($groupBy[$k]['table']);
|
||
}
|
||
}
|
||
return $this->SQLparser->compileFieldList($groupBy);
|
||
... | ... | |
$orderBy = $this->SQLparser->parseFieldList($orderBy);
|
||
foreach($orderBy as $k => $v) {
|
||
$orderBy[$k]['field'] = $this->handlerInstance[$this->lastHandlerKey]->nameQuote.$orderBy[$k]['field'].$this->handlerInstance[$this->lastHandlerKey]->nameQuote;
|
||
$orderBy[$k]['field'] = $this->handlerInstance[$this->lastHandlerKey]->DataDictionary->NameQuote($orderBy[$k]['field']);
|
||
if($orderBy[$k]['table'] != '') {
|
||
$orderBy[$k]['table'] = $this->handlerInstance[$this->lastHandlerKey]->nameQuote.$orderBy[$k]['table'].$this->handlerInstance[$this->lastHandlerKey]->nameQuote;
|
||
$orderBy[$k]['table'] = $this->handlerInstance[$this->lastHandlerKey]->DataDictionary->NameQuote($orderBy[$k]['table']);
|
||
}
|
||
}
|
||
return $this->SQLparser->compileFieldList($orderBy);
|