Raised DBAL version from 1.1.7 to 1.1.8
authorXavier Perseguers <typo3@perseguers.ch>
Tue, 28 Sep 2010 14:13:41 +0000 (14:13 +0000)
committerXavier Perseguers <typo3@perseguers.ch>
Tue, 28 Sep 2010 14:13:41 +0000 (14:13 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-4@8920 709f56b5-9817-0410-a4d7-c38de5d9e867

21 files changed:
ChangeLog
typo3/sysext/dbal/ChangeLog
typo3/sysext/dbal/class.tx_dbal_autoloader.php
typo3/sysext/dbal/class.tx_dbal_installtool.php
typo3/sysext/dbal/class.ux_t3lib_db.php
typo3/sysext/dbal/class.ux_t3lib_sqlparser.php
typo3/sysext/dbal/doc/manual.sxw
typo3/sysext/dbal/ext_emconf.php
typo3/sysext/dbal/last_synched_target
typo3/sysext/dbal/lib/class.tx_dbal_tsparserext.php
typo3/sysext/dbal/mod1/index.php
typo3/sysext/dbal/tests/BaseTestCase.php
typo3/sysext/dbal/tests/FakeDbConnection.php
typo3/sysext/dbal/tests/dbGeneralTest.php
typo3/sysext/dbal/tests/dbMssqlTest.php
typo3/sysext/dbal/tests/dbOracleTest.php
typo3/sysext/dbal/tests/dbPostgresqlTest.php
typo3/sysext/dbal/tests/fixtures/mssql.config.php
typo3/sysext/dbal/tests/fixtures/oci8.config.php
typo3/sysext/dbal/tests/fixtures/postgresql.config.php
typo3/sysext/dbal/tests/sqlParserGeneralTest.php

index 8658d61..2b7cd51 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-09-28  Xavier Perseguers  <typo3@perseguers.ch>
+
+       * Raised DBAL version from 1.1.7 to 1.1.8
+
 2010-09-27  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed bug #15820: htmlArea RTE: Failure to install AllowClipboard Helper extension raises js error
index 05244d6..e49ad69 100644 (file)
@@ -1,6 +1,46 @@
+2010-09-28  Xavier Perseguers  <typo3@perseguers.ch>
+
+       * Set version to 1.1.8
+
+2010-09-20  Xavier Perseguers  <typo3@perseguers.ch>
+
+       * Fixed bug #15751: dbal does not parse setDBinit correctly (thanks to Tamer Erdogan)
+
+2010-08-30  Xavier Perseguers  <typo3@perseguers.ch>
+
+       * Fixed bug #15582: Call to deprecated function template::middle()
+
+2010-08-23  Xavier Perseguers  <typo3@perseguers.ch>
+
+       * Fixed bug with BETWEEN / NOT BETWEEN which was not properly supported
+
+2010-08-14  Xavier Perseguers  <typo3@perseguers.ch>
+
+       * Code cleanup with useless blank spaces at end of line
+
+2010-08-08  Xavier Perseguers  <typo3@perseguers.ch>
+
+       * Fixed bug #15253: NOT LIKE is not remapped using dbms_lob.instr with Oracle
+
+2010-07-17  Xavier Perseguers  <typo3@perseguers.ch>
+
+       * Updated PHP documentation
+
+2010-07-11  Xavier Perseguers  <typo3@perseguers.ch>
+
+       * Fixed bug #15045: Trailing newlines after php closing tag
+
+2010-06-27  Xavier Perseguers  <typo3@perseguers.ch>
+
+       * Synchronized @deprecated annotations with Core
+
 2010-06-22  Jeff Segars  <jeff@webempoweredchurch.org>
 
-       * Fixed bug #14814: Improve install tool texts.
+       * Fixed bug #14814: Improve install tool texts
+
+2010-06-19  Xavier Perseguers  <typo3@perseguers.ch>
+
+       * Updated copyright year in manual
 
 2010-06-13  Xavier Perseguers  <typo3@perseguers.ch>
 
index 4af9e2c..3d1be1d 100644 (file)
@@ -143,7 +143,7 @@ class tx_dbal_autoloader {
                        $header = 'Error';
                        $message = $e->getMessage();
                        t3lib_timeTrack::debug_typo3PrintError($header, $message, FALSE, t3lib_div::getIndpEnv('TYPO3_SITE_URL'));
-                       exit; 
+                       exit;
                }
        }
 
index 0fda238..41148d1 100644 (file)
@@ -73,7 +73,7 @@ class tx_dbal_installtool {
 
        /**
         * Hooks into Installer to let a non-MySQL database to be configured.
-        * 
+        *
         * @param array $markers
         * @param integer $step
         * @param tx_install $instObj
@@ -92,7 +92,7 @@ class tx_dbal_installtool {
 
        /**
         * Hooks into Installer to modify lines to be written to localconf.php.
-        * 
+        *
         * @param array $lines
         * @param integer $step
         * @param tx_install $instObj
@@ -137,14 +137,14 @@ class tx_dbal_installtool {
 
        /**
         * Creates a specialized form to configure the DBMS connection.
-        * 
+        *
         * @param array $markers
         * @param tx_install $instObj
         * @return void
         */
        protected function createConnectionForm(array &$markers, tx_install $instObj) {
                        // Normalize current driver
-               if (!$this->driver) {  
+               if (!$this->driver) {
                        $this->driver = $this->getDefaultDriver();
                }
 
@@ -450,7 +450,7 @@ class tx_dbal_installtool {
 
        /**
         * Creates a specialized form to configure the database.
-        * 
+        *
         * @param array $markers
         * @param tx_install $instObj
         */
index 61e623e..b47f474 100644 (file)
@@ -207,18 +207,18 @@ class ux_t3lib_DB extends t3lib_DB {
 
        /**
         * Clears the cached field information file.
-        * 
+        *
         * @return void
         */
        public function clearCachedFieldInfo() {
                if (file_exists(PATH_typo3conf . 'temp_fieldInfo.php')) {
-                       unlink(PATH_typo3conf . 'temp_fieldInfo.php');  
+                       unlink(PATH_typo3conf . 'temp_fieldInfo.php');
                }
        }
 
        /**
         * Caches the field information.
-        * 
+        *
         * @return void
         */
        public function cacheFieldInfo() {
@@ -307,7 +307,7 @@ class ux_t3lib_DB extends t3lib_DB {
                                        if (isset($mappedConf['mapFieldNames'][$fieldInfo['incFields'][$mappedTable]])) {
                                                $fieldInfo['incFields'][$mappedTableAlias] = $mappedConf['mapFieldNames'][$fieldInfo['incFields'][$mappedTable]];
                                        } else {
-                                               $fieldInfo['incFields'][$mappedTableAlias] = $fieldInfo['incFields'][$mappedTable];     
+                                               $fieldInfo['incFields'][$mappedTableAlias] = $fieldInfo['incFields'][$mappedTable];
                                        }
                                }
 
@@ -324,7 +324,7 @@ class ux_t3lib_DB extends t3lib_DB {
                                        if (isset($mappedConf['mapFieldNames'][$fieldInfo['primaryKeys'][$mappedTable]])) {
                                                $fieldInfo['primaryKeys'][$mappedTableAlias] = $mappedConf['mapFieldNames'][$fieldInfo['primaryKeys'][$mappedTable]];
                                        } else {
-                                               $fieldInfo['primaryKeys'][$mappedTableAlias] = $fieldInfo['primaryKeys'][$mappedTable]; 
+                                               $fieldInfo['primaryKeys'][$mappedTableAlias] = $fieldInfo['primaryKeys'][$mappedTable];
                                        }
                                }
                        }
@@ -755,7 +755,7 @@ class ux_t3lib_DB extends t3lib_DB {
 
        /**
         * Truncates a table.
-        * 
+        *
         * @param       string          Database tablename
         * @return      mixed           Result from handler
         */
@@ -812,7 +812,7 @@ class ux_t3lib_DB extends t3lib_DB {
        /**
         * Executes a query.
         * EXPERIMENTAL since TYPO3 4.4.
-        * 
+        *
         * @param array $queryParts SQL parsed by method parseSQL() of t3lib_sqlparser
         * @return pointer Result pointer / DBAL object
         * @see ux_t3lib_db::sql_query()
@@ -852,7 +852,7 @@ class ux_t3lib_DB extends t3lib_DB {
                                        }
                                }
                                return $this->exec_INSERTquery($table, $values);
-                               
+
                        case 'DELETE':
                                $table = $queryParts['TABLE'];
                                $whereClause = isset($queryParts['WHERE']) ? $this->SQLparser->compileWhereClause($queryParts['WHERE']) : '1=1';
@@ -1111,7 +1111,7 @@ class ux_t3lib_DB extends t3lib_DB {
                                $limit = $numrows . ' OFFSET ' . $offset;
                        }
                }
-               
+
                $select_fields = $this->quoteFieldNames($select_fields);
                $from_table = $this->quoteFromTables($from_table);
                $where_clause = $this->quoteWhereClause($where_clause);
@@ -1128,7 +1128,7 @@ class ux_t3lib_DB extends t3lib_DB {
 
        /**
         * Creates a TRUNCATE TABLE SQL-statement
-        * 
+        *
         * @param       string          See exec_TRUNCATEquery()
         * @return      string          Full SQL query for TRUNCATE TABLE
         */
@@ -1154,7 +1154,7 @@ class ux_t3lib_DB extends t3lib_DB {
 
        /**
         * Quotes components of a SELECT subquery.
-        * 
+        *
         * @param array $components     Array of SQL query components
         * @return array
         */
@@ -1226,7 +1226,7 @@ class ux_t3lib_DB extends t3lib_DB {
                                        }
                                        foreach ($select_fields[$k]['flow-control']['when'] as $key => $when) {
                                                $select_fields[$k]['flow-control']['when'][$key]['when_value'] = $this->_quoteWhereClause($when['when_value']);
-                                       } 
+                                       }
                                }
                        }
                }
@@ -1282,7 +1282,7 @@ class ux_t3lib_DB extends t3lib_DB {
        /**
         * Quotes the field (and table) names within a where clause with the quote character suitable for the DB being used
         *
-        * @param       string          A where clause that can e parsed by parseWhereClause
+        * @param       string          A where clause that can be parsed by parseWhereClause
         * @return      string          Usable where clause with quoted field/table names
         */
        public function quoteWhereClause($where_clause) {
@@ -1367,10 +1367,11 @@ class ux_t3lib_DB extends t3lib_DB {
        }
 
        /**
-        * [Describe function...]
+        * Quotes field names in a SQL GROUP BY clause acccording to DB rules
         *
-        * @param       [type]          $$groupBy: ...
-        * @return      [type]          ...
+        * @param       array           $groupBy The parsed GROUP BY clause to quote
+        * @return      array
+        * @see quoteGroupBy()
         */
        protected function quoteGroupBy($groupBy) {
                if ($groupBy === '') return '';
@@ -1387,10 +1388,11 @@ class ux_t3lib_DB extends t3lib_DB {
        }
 
        /**
-        * [Describe function...]
+        * Quotes the field (and table) names within an order by clause with the quote
+        * character suitable for the DB being used
         *
-        * @param       [type]          $$orderBy: ...
-        * @return      [type]          ...
+        * @param       string          An order by clause that can by parsed by parseFieldList
+        * @return      string          Usable order by clause with quoted field/table names
         */
        protected function quoteOrderBy($orderBy) {
                if ($orderBy === '') return '';
@@ -1972,7 +1974,7 @@ class ux_t3lib_DB extends t3lib_DB {
         *
         * You should use exec_* function from this class instead!
         * If you don't, anything that does not use the _DEFAULT handler will probably break!
-        * 
+        *
         * This method was deprecated in TYPO3 4.1 but is considered experimental since TYPO3 4.4
         * as it tries to handle the query correctly anyway.
         *
@@ -2016,7 +2018,6 @@ class ux_t3lib_DB extends t3lib_DB {
         * @param       string          Username to connect with.
         * @param       string          Password to connect with.
         * @return      mixed           Returns handler connection value
-        * @deprecated since TYPO3 4.1
         * @see handler_init()
         */
        public function sql_pconnect($TYPO3_db_host, $TYPO3_db_username, $TYPO3_db_password) {
@@ -2036,7 +2037,6 @@ class ux_t3lib_DB extends t3lib_DB {
         *
         * @param       string          Database to connect to.
         * @return      boolean         Always returns TRUE; function is obsolete, database selection is made in handler_init() function!
-        * @deprecated since TYPO3 4.1
         */
        public function sql_select_db($TYPO3_db) {
                return TRUE;
@@ -2275,7 +2275,7 @@ class ux_t3lib_DB extends t3lib_DB {
                                                $theKey['Table'] = $tableName;
                                                $theKey['Non_unique'] = (int) !$theKey['unique'];
                                                $theKey['Key_name'] = str_replace($tableName.'_','',$k);
-       
+
                                                        // the following are probably not needed anyway...
                                                $theKey['Collation'] = '';
                                                $theKey['Cardinality'] = '';
@@ -2284,7 +2284,7 @@ class ux_t3lib_DB extends t3lib_DB {
                                                $theKey['Null'] = '';
                                                $theKey['Index_type'] = '';
                                                $theKey['Comment'] = '';
-       
+
                                                        // now map multiple fields into multiple rows (we mimic MySQL, remember...)
                                                $keycols = $theKey['columns'];
                                                while (list($c, $theCol) = each($keycols)) {
@@ -2299,7 +2299,7 @@ class ux_t3lib_DB extends t3lib_DB {
                                $theKey['Table'] = $tableName;
                                $theKey['Non_unique'] = 0;
                                $theKey['Key_name'] = 'PRIMARY';
-       
+
                                        // the following are probably not needed anyway...
                                $theKey['Collation'] = '';
                                $theKey['Cardinality'] = '';
@@ -2308,7 +2308,7 @@ class ux_t3lib_DB extends t3lib_DB {
                                $theKey['Null'] = '';
                                $theKey['Index_type'] = '';
                                $theKey['Comment'] = '';
-       
+
                                        // now map multiple fields into multiple rows (we mimic MySQL, remember...)
                                if ($priKeyRow !== FALSE) {
                                        while (list($c, $theCol) = each($priKeyRow)) {
@@ -2527,7 +2527,7 @@ class ux_t3lib_DB extends t3lib_DB {
                                                if (mysql_select_db($cfgArray['config']['database'], $link)) {
                                                        $output = TRUE;
                                                }
-                                               $setDBinit = t3lib_div::trimExplode(chr(10), $GLOBALS['TYPO3_CONF_VARS']['SYS']['setDBinit'], 1);
+                                               $setDBinit = t3lib_div::trimExplode(LF, str_replace("' . LF . '", LF, $GLOBALS['TYPO3_CONF_VARS']['SYS']['setDBinit']), TRUE);
                                                foreach ($setDBinit as $v) {
                                                        if (mysql_query($v, $link) === FALSE) {
                                                                t3lib_div::sysLog('Could not initialize DB connection with query "'.$v.'".','Core',3);
@@ -2801,7 +2801,7 @@ class ux_t3lib_DB extends t3lib_DB {
                                                // Mapping withTable of the JOIN
                                        $withTableKey = $this->getMappingKey($join['withTable']);
                                        if ($this->mapping[$withTableKey]['mapTableName']) {
-                                               $tables[$k]['JOIN'][$joinCnt]['withTable'] = $this->mapping[$withTableKey]['mapTableName'];                                     
+                                               $tables[$k]['JOIN'][$joinCnt]['withTable'] = $this->mapping[$withTableKey]['mapTableName'];
                                        }
                                        $onPartsArray = array();
                                                // Mapping ON parts of the JOIN
@@ -2987,7 +2987,7 @@ class ux_t3lib_DB extends t3lib_DB {
                                                }
 
                                                        // Mapping flow-control statements
-                                               if (isset($sqlPartArray[$k]['flow-control'])) {                                                 
+                                               if (isset($sqlPartArray[$k]['flow-control'])) {
                                                        if (isset($sqlPartArray[$k]['flow-control']['type'])) {
                                                                $temp = array($sqlPartArray[$k]['flow-control']);
                                                                $this->map_sqlParts($temp, $t); // Call recursively!
@@ -3004,7 +3004,7 @@ class ux_t3lib_DB extends t3lib_DB {
                                                                $sqlPartArray[$k]['value']['args'][$argK]['table'] = $this->mapping[$tableKey]['mapTableName'];
                                                        }
                                                        if (is_array($this->mapping[$tableKey]['mapFieldNames']) && isset($this->mapping[$tableKey]['mapFieldNames'][$fieldDef['field']])) {
-                                                               $sqlPartArray[$k]['value']['args'][$argK]['field'] = $this->mapping[$tableKey]['mapFieldNames'][$fieldDef['field']];    
+                                                               $sqlPartArray[$k]['value']['args'][$argK]['field'] = $this->mapping[$tableKey]['mapFieldNames'][$fieldDef['field']];
                                                        }
                                                }
                                        }
@@ -3213,10 +3213,11 @@ class ux_t3lib_DB extends t3lib_DB {
                        }
 
                                // if lastQuery is empty (for whatever reason) at least log inData.args
-                       if (empty($this->lastQuery))
-                               $query = implode(' ',$inData['args']);
-                       else
+                       if (empty($this->lastQuery)) {
+                               $query = implode(' ', $inData['args']);
+                       } else {
                                $query = $this->lastQuery;
+                       }
 
                        if ($this->conf['debugOptions']['backtrace']) {
                                $backtrace = debug_backtrace();
index 585dc17..a8c2be1 100644 (file)
@@ -67,7 +67,7 @@ class ux_t3lib_sqlparser extends t3lib_sqlparser {
                                if (is_array($selectFields)) {
                                        $outputParts = array();
                                        foreach ($selectFields as $k => $v) {
-               
+
                                                        // Detecting type:
                                                switch($v['type'])      {
                                                        case 'function':
@@ -82,12 +82,12 @@ class ux_t3lib_sqlparser extends t3lib_sqlparser {
                                                                $outputParts[$k] = ($v['distinct'] ? $v['distinct'] : '') . ($v['table'] ? $v['table'] . '.' : '') . $v['field'];
                                                                break;
                                                }
-               
+
                                                        // Alias:
                                                if ($v['as']) {
                                                        $outputParts[$k] .= ' ' . $v['as_keyword'] . ' ' . $v['as'];
                                                }
-               
+
                                                        // Specifically for ORDER BY and GROUP BY field lists:
                                                if ($v['sortDir']) {
                                                        $outputParts[$k] .= ' ' . $v['sortDir'];
@@ -100,10 +100,10 @@ class ux_t3lib_sqlparser extends t3lib_sqlparser {
                                        $output .= implode(', ', $outputParts);
                                }
                                break;
-               }       
+               }
                return $output;
        }
+
        /**
         * Compiles a CASE ... WHEN flow-control construct based on input array (made with ->parseCaseStatement())
         *
@@ -152,7 +152,7 @@ class ux_t3lib_sqlparser extends t3lib_sqlparser {
        protected function compileAddslashes($str) {
                return $str;
        }
-       
+
        /*************************
         *
         * Compiling queries
@@ -494,7 +494,7 @@ class ux_t3lib_sqlparser extends t3lib_sqlparser {
 
                                                                        // Set field/table with modifying prefix if any:
                                                                $output .= ' ' . trim($v['modifier']) . ' ';
-       
+
                                                                        // DBAL-specific: Set calculation, if any:
                                                                if ($v['calc'] === '&' && $functionMapping) {
                                                                        switch(TRUE) {
@@ -514,7 +514,7 @@ class ux_t3lib_sqlparser extends t3lib_sqlparser {
                                                                        } else {
                                                                                $output .= $v['calc_value'][1] . $this->compileAddslashes($v['calc_value'][0]) . $v['calc_value'][1];
                                                                        }
-                                                               } elseif (!($GLOBALS['TYPO3_DB']->runningADOdbDriver('oci8') && $v['comparator'] === 'LIKE' && $functionMapping)) {
+                                                               } elseif (!($GLOBALS['TYPO3_DB']->runningADOdbDriver('oci8') && preg_match('/(NOT )?LIKE/', $v['comparator']) && $functionMapping)) {
                                                                        $output .= trim(($v['table'] ? $v['table'] . '.' : '') . $v['field']);
                                                                }
                                                        }
@@ -522,7 +522,7 @@ class ux_t3lib_sqlparser extends t3lib_sqlparser {
                                                                // Set comparator:
                                                        if ($v['comparator']) {
                                                                switch (TRUE) {
-                                                                       case ($GLOBALS['TYPO3_DB']->runningADOdbDriver('oci8') && $v['comparator'] === 'LIKE' && $functionMapping):
+                                                                       case ($GLOBALS['TYPO3_DB']->runningADOdbDriver('oci8') && preg_match('/(NOT )?LIKE/', $v['comparator']) && $functionMapping):
                                                                                                // Oracle cannot handle LIKE on CLOB fields - sigh
                                                                                        if (isset($v['value']['operator'])) {
                                                                                                $values = array();
@@ -531,7 +531,10 @@ class ux_t3lib_sqlparser extends t3lib_sqlparser {
                                                                                                }
                                                                                                $compareValue = ' ' . $v['value']['operator'] . '(' . implode(',', $values) . ')';
                                                                                        } else {
-                                                                                               $compareValue = $v['value'][1] . $this->compileAddslashes(trim($v['value'][0], '%')) . $v['value'][1]; 
+                                                                                               $compareValue = $v['value'][1] . $this->compileAddslashes(trim($v['value'][0], '%')) . $v['value'][1];
+                                                                                       }
+                                                                                       if (t3lib_div::isFirstPartOfStr($v['comparator'], 'NOT')) {
+                                                                                               $output .= 'NOT ';
                                                                                        }
                                                                                                // To be on the safe side
                                                                                        $isLob = TRUE;
@@ -554,7 +557,7 @@ class ux_t3lib_sqlparser extends t3lib_sqlparser {
                                                                                        // Detecting value type; list or plain:
                                                                                if (t3lib_div::inList('NOTIN,IN', strtoupper(str_replace(array(' ', "\t", "\r", "\n"), '', $v['comparator'])))) {
                                                                                        if (isset($v['subquery'])) {
-                                                                                               $output .= ' (' . $this->compileSELECT($v['subquery']) . ')';   
+                                                                                               $output .= ' (' . $this->compileSELECT($v['subquery']) . ')';
                                                                                        } else {
                                                                                                $valueBuffer = array();
                                                                                                foreach ($v['value'] as $realValue) {
@@ -562,6 +565,12 @@ class ux_t3lib_sqlparser extends t3lib_sqlparser {
                                                                                                }
                                                                                                $output .= ' (' . trim(implode(',', $valueBuffer)) . ')';
                                                                                        }
+                                                                               } else if (t3lib_div::inList('BETWEEN,NOT BETWEEN', $v['comparator'])) {
+                                                                                       $lbound = $v['values'][0];
+                                                                                       $ubound = $v['values'][1];
+                                                                                       $output .= ' ' . $lbound[1] . $this->compileAddslashes($lbound[0]) . $lbound[1];
+                                                                                       $output .= ' AND ';
+                                                                                       $output .= $ubound[1] . $this->compileAddslashes($ubound[0]) . $ubound[1];
                                                                                } else if (isset($v['value']['operator'])) {
                                                                                        $values = array();
                                                                                        foreach ($v['value']['args'] as $fieldDef) {
index 564403b..58cff19 100644 (file)
Binary files a/typo3/sysext/dbal/doc/manual.sxw and b/typo3/sysext/dbal/doc/manual.sxw differ
index 7a26faa..a6561dc 100644 (file)
@@ -32,7 +32,7 @@ $EM_CONF[$_EXTKEY] = array(
        'author_company' => '',
        'CGLcompliance' => '',
        'CGLcompliance_note' => '',
-       'version' => '1.1.7',
+       'version' => '1.1.8',
        '_md5_values_when_last_written' => 'a:43:{s:9:"ChangeLog";s:4:"ba81";s:28:"class.tx_dbal_autoloader.php";s:4:"4781";s:29:"class.tx_dbal_installtool.php";s:4:"ffb8";s:26:"class.ux_db_list_extra.php";s:4:"7af1";s:21:"class.ux_t3lib_db.php";s:4:"5d57";s:28:"class.ux_t3lib_sqlparser.php";s:4:"4b4e";s:16:"ext_autoload.php";s:4:"821a";s:21:"ext_conf_template.txt";s:4:"f5cf";s:12:"ext_icon.gif";s:4:"c9ba";s:17:"ext_localconf.php";s:4:"afdd";s:14:"ext_tables.php";s:4:"8414";s:14:"ext_tables.sql";s:4:"1f95";s:19:"last_synched_target";s:4:"5d1b";s:27:"doc/class.tslib_fe.php.diff";s:4:"0083";s:14:"doc/manual.sxw";s:4:"b022";s:45:"handlers/class.tx_dbal_handler_openoffice.php";s:4:"8b11";s:43:"handlers/class.tx_dbal_handler_rawmysql.php";s:4:"c024";s:40:"handlers/class.tx_dbal_handler_xmldb.php";s:4:"a9bb";s:31:"lib/class.tx_dbal_sqlengine.php";s:4:"2ed1";s:33:"lib/class.tx_dbal_tsparserext.php";s:4:"862d";s:14:"mod1/clear.gif";s:4:"cc11";s:13:"mod1/conf.php";s:4:"6e63";s:14:"mod1/index.php";s:4:"0bd5";s:18:"mod1/locallang.xml";s:4:"0b57";s:22:"mod1/locallang_mod.xml";s:4:"86ef";s:19:"mod1/moduleicon.gif";s:4:"2b8f";s:10:"res/README";s:4:"be19";s:26:"res/Templates/install.html";s:4:"62c9";s:30:"res/oracle/indexed_search.diff";s:4:"ec81";s:23:"res/oracle/realurl.diff";s:4:"86da";s:25:"res/oracle/scheduler.diff";s:4:"7c06";s:27:"res/oracle/templavoila.diff";s:4:"1fd5";s:43:"res/postgresql/postgresql-compatibility.sql";s:4:"034c";s:22:"tests/BaseTestCase.php";s:4:"9e07";s:26:"tests/FakeDbConnection.php";s:4:"35f0";s:23:"tests/dbGeneralTest.php";s:4:"9bfc";s:21:"tests/dbMssqlTest.php";s:4:"4cbc";s:22:"tests/dbOracleTest.php";s:4:"16b6";s:26:"tests/dbPostgresqlTest.php";s:4:"27cd";s:30:"tests/sqlParserGeneralTest.php";s:4:"5953";s:31:"tests/fixtures/mssql.config.php";s:4:"0ec8";s:30:"tests/fixtures/oci8.config.php";s:4:"4a1a";s:36:"tests/fixtures/postgresql.config.php";s:4:"2296";}',
        'constraints' => array(
                'depends' => array(
index 34db8d8..5e56aef 100644 (file)
@@ -1 +1 @@
-https://svn.typo3.org/TYPO3v4/Extensions/dbal/tags/1.1.7/
+https://svn.typo3.org/TYPO3v4/Extensions/dbal/tags/1.1.8/
index 6271e72..ac797b3 100644 (file)
@@ -39,7 +39,7 @@ class tx_dbal_tsparserext {
 
        /**
         * Renders a message for EM.
-        * 
+        *
         * @param array $params
         * @param t3lib_tsStyleConfig $tsObj
         * @return string
index 5473607..4d888fd 100644 (file)
@@ -122,7 +122,6 @@ class tx_dbal_module1 extends t3lib_SCbase {
         * @return      string HTML output
         */
        public function printContent()  {
-               $this->content .= $this->doc->middle();
                $this->content .= $this->doc->endPage();
                echo $this->content;
        }
index 2316189..95af056 100644 (file)
  *
  * Subclass this base class if you want to take advantage of the framework
  * capabilities.
- * 
+ *
  * $Id: BaseTestCase.php 27006 2009-11-25 22:08:07Z xperseguers $
- * 
+ *
  * @author Robert Lemke <robert@typo3.org>
- * 
+ *
  * This method is backported from FLOW3's BaseTestCase class.
  * @link https://svn.typo3.org/FLOW3/Packages/Testing/trunk/Classes/BaseTestCase.php
  *
index 24ea8a1..95b43c4 100644 (file)
@@ -25,7 +25,7 @@
 
 /**
  * Fake ADOdb connection factory.
- * 
+ *
  * $Id: FakeDbConnection.php 27006 2009-11-25 22:08:07Z xperseguers $
  *
  * @author Xavier Perseguers <typo3@perseguers.ch>
@@ -37,7 +37,7 @@ class FakeDbConnection {
 
        /**
         * Creates a fake database connection.
-        * 
+        *
         * @param ux_t3lib_db $db
         * @param string $databaseType Type of the database (e.g., 'oracle')
         * @param string $driver Driver to use (e.g., 'oci8')
index deabb27..fcc9488 100644 (file)
@@ -27,7 +27,7 @@ require_once('BaseTestCase.php');
 
 /**
  * Testcase for class ux_t3lib_db.
- * 
+ *
  * $Id$
  *
  * @author Xavier Perseguers <typo3@perseguers.ch>
@@ -47,7 +47,7 @@ class dbGeneralTest extends BaseTestCase {
         */
        protected $loadedExtensions;
 
-       /** 
+       /**
         * @var array
         */
        protected $temporaryFiles;
@@ -83,7 +83,7 @@ class dbGeneralTest extends BaseTestCase {
 
        /**
         * Cleans a SQL query.
-        *  
+        *
         * @param mixed $sql
         * @return mixed (string or array)
         */
@@ -99,7 +99,7 @@ class dbGeneralTest extends BaseTestCase {
 
        /**
         * Creates a fake extension with a given table definition.
-        * 
+        *
         * @param string $tableDefinition SQL script to create the extension's tables
         * @return void
         */
index 3b68fd8..17885fe 100644 (file)
@@ -28,7 +28,7 @@ require_once('FakeDbConnection.php');
 
 /**
  * Testcase for class ux_t3lib_db. Testing MS SQL database handling.
- * 
+ *
  * $Id$
  *
  * @author Xavier Perseguers <typo3@perseguers.ch>
@@ -86,7 +86,7 @@ class dbMssqlTest extends BaseTestCase {
 
        /**
         * Cleans a SQL query.
-        *  
+        *
         * @param mixed $sql
         * @return mixed (string or array)
         */
@@ -101,7 +101,7 @@ class dbMssqlTest extends BaseTestCase {
        }
 
        /**
-        * @test 
+        * @test
         */
        public function configurationIsUsingAdodbAndDriverMssql() {
                $configuration = $GLOBALS['TYPO3_DB']->conf['handlerCfg'];
@@ -110,7 +110,7 @@ class dbMssqlTest extends BaseTestCase {
                $this->assertTrue($GLOBALS['TYPO3_DB']->runningADOdbDriver('mssql') !== FALSE, 'Not using mssql driver');
        }
 
-       /** 
+       /**
         * @test
         */
        public function tablesWithMappingAreDetected() {
@@ -162,7 +162,7 @@ class dbMssqlTest extends BaseTestCase {
                $query = $this->cleanSql($GLOBALS['TYPO3_DB']->SELECTquery(
                        '*, CASE WHEN' .
                                ' LOCATE(' . $GLOBALS['TYPO3_DB']->fullQuoteStr('(fce)', 'tx_templavoila_tmplobj') . ', datastructure)>0 THEN 2' .
-                               ' ELSE 1' . 
+                               ' ELSE 1' .
                        ' END AS scope',
                        'tx_templavoila_tmplobj',
                        '1=1'
@@ -179,7 +179,7 @@ class dbMssqlTest extends BaseTestCase {
                $query = $this->cleanSql($GLOBALS['TYPO3_DB']->SELECTquery(
                        '*, CASE WHEN' .
                                ' LOCATE(' . $GLOBALS['TYPO3_DB']->fullQuoteStr('(fce)', 'tx_templavoila_tmplobj') . ', datastructure, 4)>0 THEN 2' .
-                               ' ELSE 1' . 
+                               ' ELSE 1' .
                        ' END AS scope',
                        'tx_templavoila_tmplobj',
                        '1=1'
@@ -195,7 +195,7 @@ class dbMssqlTest extends BaseTestCase {
        public function locateStatementIsProperlyRemapped() {
                $selectFields = '*, CASE WHEN' .
                                ' LOCATE(' . $GLOBALS['TYPO3_DB']->fullQuoteStr('(fce)', 'tx_templavoila_tmplobj') . ', datastructure, 4)>0 THEN 2' .
-                               ' ELSE 1' . 
+                               ' ELSE 1' .
                        ' END AS scope';
                $fromTables   = 'tx_templavoila_tmplobj';
                $whereClause  = '1=1';
@@ -216,7 +216,7 @@ class dbMssqlTest extends BaseTestCase {
        public function locateStatementWithExternalTableIsProperlyRemapped() {
                $selectFields = '*, CASE WHEN' .
                                ' LOCATE(' . $GLOBALS['TYPO3_DB']->fullQuoteStr('(fce)', 'tx_templavoila_tmplobj') . ', tx_templavoila_tmplobj.datastructure, 4)>0 THEN 2' .
-                               ' ELSE 1' . 
+                               ' ELSE 1' .
                        ' END AS scope';
                $fromTables   = 'tx_templavoila_tmplobj';
                $whereClause  = '1=1';
index 9d84736..90dce08 100644 (file)
@@ -28,7 +28,7 @@ require_once('FakeDbConnection.php');
 
 /**
  * Testcase for class ux_t3lib_db. Testing Oracle database handling.
- * 
+ *
  * $Id$
  *
  * @author Xavier Perseguers <typo3@perseguers.ch>
@@ -86,7 +86,7 @@ class dbOracleTest extends BaseTestCase {
 
        /**
         * Cleans a SQL query.
-        *  
+        *
         * @param mixed $sql
         * @return mixed (string or array)
         */
@@ -101,7 +101,7 @@ class dbOracleTest extends BaseTestCase {
        }
 
        /**
-        * @test 
+        * @test
         */
        public function configurationIsUsingAdodbAndDriverOci8() {
                $configuration = $GLOBALS['TYPO3_DB']->conf['handlerCfg'];
@@ -110,7 +110,7 @@ class dbOracleTest extends BaseTestCase {
                $this->assertTrue($GLOBALS['TYPO3_DB']->runningADOdbDriver('oci8') !== FALSE, 'Not using oci8 driver');
        }
 
-       /** 
+       /**
         * @test
         */
        public function tablesWithMappingAreDetected() {
@@ -269,7 +269,7 @@ class dbOracleTest extends BaseTestCase {
                $this->assertEquals($expected, $query);
        }
 
-       /** 
+       /**
         * @test
         * @see http://bugs.typo3.org/view.php?id=6198
         */
@@ -500,7 +500,7 @@ class dbOracleTest extends BaseTestCase {
                $groupBy      = '';
                $orderBy      = '';
 
-                       // First call to possibly alter (in memory) the mapping from localconf.php 
+                       // First call to possibly alter (in memory) the mapping from localconf.php
                $GLOBALS['TYPO3_DB']->_callRef('map_remapSELECTQueryParts', $selectFields, $fromTables, $whereClause, $groupBy, $orderBy);
 
                $selectFields = 'uid';
@@ -659,6 +659,28 @@ class dbOracleTest extends BaseTestCase {
 
        /**
         * @test
+        * @see http://bugs.typo3.org/view.php?id=15253
+        */
+       public function notLikeIsRemappedAccordingToFieldType() {
+               $select = $this->cleanSql($GLOBALS['TYPO3_DB']->SELECTquery(
+                       '*',
+                       'tt_content',
+                       'tt_content.bodytext NOT LIKE \'foo%\''
+               ));
+               $expected = 'SELECT * FROM "tt_content" WHERE NOT (dbms_lob.instr("tt_content"."bodytext", \'foo\',1,1) > 0)';
+               $this->assertEquals($expected, $select);
+
+               $select = $this->cleanSql($GLOBALS['TYPO3_DB']->SELECTquery(
+                       '*',
+                       'fe_users',
+                       'fe_users.usergroup NOT LIKE \'2\''
+               ));
+               $expected = 'SELECT * FROM "fe_users" WHERE NOT (instr("fe_users"."usergroup", \'2\',1,1) > 0)';
+               $this->assertEquals($expected, $select);
+       }
+
+       /**
+        * @test
         * @see http://bugs.typo3.org/view.php?id=14479
         */
        public function instrIsUsedForCEOnPages() {
@@ -687,7 +709,7 @@ class dbOracleTest extends BaseTestCase {
                $expected .= ' OR (instr("tt_content"."fe_group", \'-1,\',1,1) > 0)';
                $expected .= ' OR (instr("tt_content"."fe_group", \',-1\',1,1) > 0)';
                $expected .= ' OR "tt_content"."fe_group" = \'-1\'))';
-               $this->assertEquals($expected, $select); 
+               $this->assertEquals($expected, $select);
        }
 
        ///////////////////////////////////////
@@ -755,7 +777,7 @@ class dbOracleTest extends BaseTestCase {
                                firstname varchar(60) DEFAULT \'\' NOT NULL,
                                language varchar(2) NOT NULL,
                                tstamp int(11) DEFAULT \'0\' NOT NULL,
-                               
+
                                PRIMARY KEY (uid),
                                KEY name (name)
                        );
@@ -763,7 +785,7 @@ class dbOracleTest extends BaseTestCase {
 
                $components = $GLOBALS['TYPO3_DB']->SQLparser->_callRef('parseCREATETABLE', $parseString);
                $this->assertTrue(is_array($components), 'Not an array: ' . $components);
-       
+
                $sqlCommands = $GLOBALS['TYPO3_DB']->SQLparser->_call('compileCREATETABLE', $components);
                $this->assertTrue(is_array($sqlCommands), 'Not an array: ' . $sqlCommands);
                $this->assertEquals(2, count($sqlCommands));
@@ -866,7 +888,7 @@ class dbOracleTest extends BaseTestCase {
                                $table = $GLOBALS['TYPO3_DB']->mapping[$table]['mapTableName'];
                        }
                }
-               
+
                $query = $this->cleanSql($GLOBALS['TYPO3_DB']->DELETEquery($table, $where));
                $expected = 'DELETE FROM "cf_cache_hash_tags" WHERE "identifier" IN (';
                $expected .= 'SELECT "identifier" FROM "cf_cache_pages" WHERE "crdate"+"lifetime" < ' . $currentTime . ' AND "lifetime" > 0';
@@ -935,7 +957,7 @@ class dbOracleTest extends BaseTestCase {
                        'process_id, CASE active' .
                                ' WHEN 1 THEN ' . $GLOBALS['TYPO3_DB']->fullQuoteStr('one', 'tx_crawler_process') .
                                ' WHEN 2 THEN ' . $GLOBALS['TYPO3_DB']->fullQuoteStr('two', 'tx_crawler_process') .
-                               ' ELSE ' . $GLOBALS['TYPO3_DB']->fullQuoteStr('out of range', 'tx_crawler_process') . 
+                               ' ELSE ' . $GLOBALS['TYPO3_DB']->fullQuoteStr('out of range', 'tx_crawler_process') .
                        ' END AS number',
                        'tx_crawler_process',
                        '1=1'
@@ -952,7 +974,7 @@ class dbOracleTest extends BaseTestCase {
                $selectFields = 'process_id, CASE active' .
                                ' WHEN 1 THEN ' . $GLOBALS['TYPO3_DB']->fullQuoteStr('one', 'tx_crawler_process') .
                                ' WHEN 2 THEN ' . $GLOBALS['TYPO3_DB']->fullQuoteStr('two', 'tx_crawler_process') .
-                               ' ELSE ' . $GLOBALS['TYPO3_DB']->fullQuoteStr('out of range', 'tx_crawler_process') . 
+                               ' ELSE ' . $GLOBALS['TYPO3_DB']->fullQuoteStr('out of range', 'tx_crawler_process') .
                        ' END AS number';
                $fromTables   = 'tx_crawler_process';
                $whereClause  = '1=1';
@@ -975,7 +997,7 @@ class dbOracleTest extends BaseTestCase {
                $selectFields = 'process_id, CASE tt_news.uid' .
                                ' WHEN 1 THEN ' . $GLOBALS['TYPO3_DB']->fullQuoteStr('one', 'tt_news') .
                                ' WHEN 2 THEN ' . $GLOBALS['TYPO3_DB']->fullQuoteStr('two', 'tt_news') .
-                               ' ELSE ' . $GLOBALS['TYPO3_DB']->fullQuoteStr('out of range', 'tt_news') . 
+                               ' ELSE ' . $GLOBALS['TYPO3_DB']->fullQuoteStr('out of range', 'tt_news') .
                        ' END AS number';
                $fromTables   = 'tx_crawler_process, tt_news';
                $whereClause  = '1=1';
@@ -998,7 +1020,7 @@ class dbOracleTest extends BaseTestCase {
                $query = $this->cleanSql($GLOBALS['TYPO3_DB']->SELECTquery(
                        '*, CASE WHEN' .
                                ' LOCATE(' . $GLOBALS['TYPO3_DB']->fullQuoteStr('(fce)', 'tx_templavoila_tmplobj') . ', datastructure)>0 THEN 2' .
-                               ' ELSE 1' . 
+                               ' ELSE 1' .
                        ' END AS scope',
                        'tx_templavoila_tmplobj',
                        '1=1'
@@ -1015,7 +1037,7 @@ class dbOracleTest extends BaseTestCase {
                $query = $this->cleanSql($GLOBALS['TYPO3_DB']->SELECTquery(
                        '*, CASE WHEN' .
                                ' LOCATE(' . $GLOBALS['TYPO3_DB']->fullQuoteStr('(fce)', 'tx_templavoila_tmplobj') . ', datastructure, 4)>0 THEN 2' .
-                               ' ELSE 1' . 
+                               ' ELSE 1' .
                        ' END AS scope',
                        'tx_templavoila_tmplobj',
                        '1=1'
index 49d60a3..4d3209b 100644 (file)
@@ -28,7 +28,7 @@ require_once('FakeDbConnection.php');
 
 /**
  * Testcase for class ux_t3lib_db. Testing PostgreSQL database handling.
- * 
+ *
  * $Id$
  *
  * @author Xavier Perseguers <typo3@perseguers.ch>
@@ -86,7 +86,7 @@ class dbPostgresqlTest extends BaseTestCase {
 
        /**
         * Cleans a SQL query.
-        *  
+        *
         * @param mixed $sql
         * @return mixed (string or array)
         */
@@ -101,7 +101,7 @@ class dbPostgresqlTest extends BaseTestCase {
        }
 
        /**
-        * @test 
+        * @test
         */
        public function configurationIsUsingAdodbAndDriverPostgres() {
                $configuration = $GLOBALS['TYPO3_DB']->conf['handlerCfg'];
@@ -110,7 +110,7 @@ class dbPostgresqlTest extends BaseTestCase {
                $this->assertTrue($GLOBALS['TYPO3_DB']->runningADOdbDriver('postgres') !== FALSE, 'Not using postgres driver');
        }
 
-       /** 
+       /**
         * @test
         */
        public function tablesWithMappingAreDetected() {
index 9b1023e..66152eb 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
  * MS SQL configuration
- * 
+ *
  * $Id: mssql.config.php 29886 2010-02-09 21:39:29Z xperseguers $
  *
  * @author Xavier Perseguers <typo3@perseguers.ch>
 global $TYPO3_CONF_VARS;
 
 $TYPO3_CONF_VARS['EXTCONF']['dbal']['handlerCfg'] = array(
-       '_DEFAULT' => array( 
-               'type' => 'adodb', 
+       '_DEFAULT' => array(
+               'type' => 'adodb',
                'config' => array(
                        'driver' => 'mssql',
                        'useNameQuote' => FALSE,
                ),
-       ), 
+       ),
 );
 
 $TYPO3_CONF_VARS['EXTCONF']['dbal']['mapping'] = array(
index e4ad6cd..45a34c9 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
  * Oracle configuration
- * 
+ *
  * $Id: oci8.config.php 27125 2009-11-29 17:21:28Z xperseguers $
  *
  * @author Xavier Perseguers <typo3@perseguers.ch>
 global $TYPO3_CONF_VARS;
 
 $TYPO3_CONF_VARS['EXTCONF']['dbal']['handlerCfg'] = array(
-       '_DEFAULT' => array( 
-               'type' => 'adodb', 
+       '_DEFAULT' => array(
+               'type' => 'adodb',
                'config' => array(
                        'driver' => 'oci8',
                ),
-       ), 
+       ),
 );
 
 $TYPO3_CONF_VARS['EXTCONF']['dbal']['mapping'] = array(
index 9ebd54a..57f218f 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /**
  * PostgreSQL configuration
- * 
+ *
  * $Id$
  *
  * @author Xavier Perseguers <typo3@perseguers.ch>
 global $TYPO3_CONF_VARS;
 
 $TYPO3_CONF_VARS['EXTCONF']['dbal']['handlerCfg'] = array(
-       '_DEFAULT' => array( 
-               'type' => 'adodb', 
+       '_DEFAULT' => array(
+               'type' => 'adodb',
                'config' => array(
                        'driver' => 'postgres',
                ),
-       ), 
+       ),
 );
 ?>
\ No newline at end of file
index 043f072..54adc07 100644 (file)
@@ -27,7 +27,7 @@ require_once('BaseTestCase.php');
 
 /**
  * Testcase for class ux_t3lib_sqlparser
- * 
+ *
  * $Id$
  *
  * @author Xavier Perseguers <typo3@perseguers.ch>
@@ -59,7 +59,7 @@ class sqlParserGeneralTest extends BaseTestCase {
 
        /**
         * Cleans a SQL query.
-        *  
+        *
         * @param mixed $sql
         * @return mixed (string or array)
         */
@@ -185,7 +185,7 @@ class sqlParserGeneralTest extends BaseTestCase {
        public function canSelectAllFieldsFromPages() {
                $sql = 'SELECT * FROM pages';
                $expected = $sql;
-               $actual = $this->cleanSql($this->fixture->debug_testSQL($sql)); 
+               $actual = $this->cleanSql($this->fixture->debug_testSQL($sql));
 
                $this->assertEquals($expected, $actual);
        }
@@ -434,7 +434,7 @@ class sqlParserGeneralTest extends BaseTestCase {
        public function canUseInnerJoinInSelect() {
                $sql = 'SELECT pages.uid, be_users.username FROM be_users INNER JOIN pages ON pages.cruser_id = be_users.uid';
                $expected = 'SELECT pages.uid, be_users.username FROM be_users INNER JOIN pages ON pages.cruser_id=be_users.uid';
-               $actual = $this->cleanSql($this->fixture->debug_testSQL($sql)); 
+               $actual = $this->cleanSql($this->fixture->debug_testSQL($sql));
 
                $this->assertEquals($expected, $actual);
        }
@@ -445,7 +445,7 @@ class sqlParserGeneralTest extends BaseTestCase {
        public function canUseMultipleInnerJoinsInSelect() {
                $sql = 'SELECT * FROM tt_news_cat INNER JOIN tt_news_cat_mm ON tt_news_cat.uid = tt_news_cat_mm.uid_foreign INNER JOIN tt_news ON tt_news.uid = tt_news_cat_mm.uid_local';
                $expected = 'SELECT * FROM tt_news_cat INNER JOIN tt_news_cat_mm ON tt_news_cat.uid=tt_news_cat_mm.uid_foreign INNER JOIN tt_news ON tt_news.uid=tt_news_cat_mm.uid_local';
-               $actual = $this->cleanSql($this->fixture->debug_testSQL($sql)); 
+               $actual = $this->cleanSql($this->fixture->debug_testSQL($sql));
 
                $this->assertEquals($expected, $actual);
        }
@@ -464,7 +464,7 @@ class sqlParserGeneralTest extends BaseTestCase {
 
        /**
         * @test
-        * @see http://bugs.typo3.org/view.php?id=14182 
+        * @see http://bugs.typo3.org/view.php?id=14182
         */
        public function canParseMultipleJoinConditionsWithLessThanOperator() {
                $sql = 'SELECT * FROM T1 LEFT OUTER JOIN T2 ON T2.size < 4 OR T2.pid = T1.uid WHERE T1.cr_userid = 1';
@@ -478,7 +478,7 @@ class sqlParserGeneralTest extends BaseTestCase {
        // Tests concerning DB management
        ///////////////////////////////////////
 
-       /** 
+       /**
         * @test
         * @see http://bugs.typo3.org/view.php?id=4466
         */