Fixed bugs #2438 and #4496 about quoting of DISTINCT in SELECT clauses
authorKarsten Dambekalns <karsten.dambekalns@typo3.org>
Tue, 29 May 2007 16:27:53 +0000 (16:27 +0000)
committerKarsten Dambekalns <karsten.dambekalns@typo3.org>
Tue, 29 May 2007 16:27:53 +0000 (16:27 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2352 709f56b5-9817-0410-a4d7-c38de5d9e867

typo3/sysext/dbal/ChangeLog
typo3/sysext/dbal/class.ux_t3lib_db.php

index ac6a57a..eadb4a9 100644 (file)
@@ -5,6 +5,7 @@
        * Large text fields are CLOB fields now; for Oracle LIKE comparisons against such fields are translated to dbms_lob.instr() calls. This should fix e.g. bug #5535 as well as issues with TV data that cannot be unserialized (see comments on bug #4638)
        * Updates to the manual
        * A fix for bug #5481, field mapping not working on the right side of a comparison in WHERE clauses
+       * Fixed bugs #2438 and #4496 about quoting of DISTINCT in SELECT clauses
 
 2006-07-19  Karsten Dambekalns <karsten@typo3.org>
 
index 6dd90d7..c3643dd 100644 (file)
@@ -937,14 +937,8 @@ class ux_t3lib_DB extends t3lib_DB {
                                $select_fields[$k]['as'] = $this->handlerInstance[$this->lastHandlerKey]->nameQuote.$select_fields[$k]['as'].$this->handlerInstance[$this->lastHandlerKey]->nameQuote;
                        }
                        if(isset($select_fields[$k]['func_content.']) && $select_fields[$k]['func_content.'][0]['func_content'] != '*'){
-                               if(strstr($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']);
-                                       $select_fields[$k]['func_content'] = $this->quoteFieldNames($select_fields[$k]['func_content']);
-                               }
-                               else {
-                                       $select_fields[$k]['func_content.'][0]['func_content'] = $this->handlerInstance[$this->lastHandlerKey]->nameQuote.$select_fields[$k]['func_content.'][0]['func_content'].$this->handlerInstance[$this->lastHandlerKey]->nameQuote;
-                                       $select_fields[$k]['func_content'] = $this->handlerInstance[$this->lastHandlerKey]->nameQuote.$select_fields[$k]['func_content'].$this->handlerInstance[$this->lastHandlerKey]->nameQuote;
-                               }
+                               $select_fields[$k]['func_content.'][0]['func_content'] = $this->quoteFieldNames($select_fields[$k]['func_content.'][0]['func_content']);
+                               $select_fields[$k]['func_content'] = $this->quoteFieldNames($select_fields[$k]['func_content']);
                        }
                }