Fixed bug #12071: t3lib_sqlparser is not able to parse alias of a joined table
authorXavier Perseguers <typo3@perseguers.ch>
Tue, 29 Sep 2009 17:09:31 +0000 (17:09 +0000)
committerXavier Perseguers <typo3@perseguers.ch>
Tue, 29 Sep 2009 17:09:31 +0000 (17:09 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/dbal/trunk@24890 735d13b6-9817-0410-8766-e36946ffe9aa

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

index 6feb27e..0b8d5df 100644 (file)
@@ -1,3 +1,7 @@
+2009-09-29  Xavier Perseguers  <typo3@perseguers.ch>
+
+       * Fixed bug #12071: t3lib_sqlparser is not able to parse alias of a joined table
+
 2009-09-20  Xavier Perseguers  <typo3@perseguers.ch>
 
        * Fixed bug #12012: admin_get_tables() method is using PHP5.3-deprecated function mysql_list_tables
index 5d2695b..20068a1 100644 (file)
@@ -970,6 +970,7 @@ class ux_t3lib_DB extends t3lib_DB {
                        }
                        if (is_array($v['JOIN']))       {
                                $from_table[$k]['JOIN']['withTable'] = $this->quoteName($from_table[$k]['JOIN']['withTable']);
+                               $from_table[$k]['JOIN']['as'] = ($from_table[$k]['JOIN']['as']) ? $this->quoteName($from_table[$k]['JOIN']['as']) : '';
                                $from_table[$k]['JOIN']['ON'][0]['table'] = ($from_table[$k]['JOIN']['ON'][0]['table']) ? $this->quoteName($from_table[$k]['JOIN']['ON'][0]['table']) : '';
                                $from_table[$k]['JOIN']['ON'][0]['field'] = $this->quoteName($from_table[$k]['JOIN']['ON'][0]['field']);
                                $from_table[$k]['JOIN']['ON'][1]['table'] = ($from_table[$k]['JOIN']['ON'][1]['table']) ? $this->quoteName($from_table[$k]['JOIN']['ON'][1]['table']) : '';