[TASK] Use external Core Project DBAL as Git submodule
authorOliver Hader <oliver@typo3.org>
Tue, 10 May 2011 20:50:36 +0000 (22:50 +0200)
committerOliver Hader <oliver@typo3.org>
Tue, 10 May 2011 20:51:57 +0000 (22:51 +0200)
Change-Id: Ia473af95b798877ddf476e1684fea6c48b5a38c3
Resolves: #26738
Releases: 4.2, 4.3, 4.4, 4.5, 4.6
Reviewed-on: http://review.typo3.org/2013
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
39 files changed:
.gitmodules
typo3/sysext/dbal [new submodule]
typo3/sysext/dbal/ChangeLog [deleted file]
typo3/sysext/dbal/class.ux_db_list_extra.php [deleted file]
typo3/sysext/dbal/class.ux_t3lib_db.php [deleted file]
typo3/sysext/dbal/class.ux_t3lib_sqlparser.php [deleted file]
typo3/sysext/dbal/doc/class.tslib_fe.php.diff [deleted file]
typo3/sysext/dbal/doc/manual.sxw [deleted file]
typo3/sysext/dbal/ext_autoload.php [deleted file]
typo3/sysext/dbal/ext_conf_template.txt [deleted file]
typo3/sysext/dbal/ext_emconf.php [deleted file]
typo3/sysext/dbal/ext_icon.gif [deleted file]
typo3/sysext/dbal/ext_localconf.php [deleted file]
typo3/sysext/dbal/ext_tables.php [deleted file]
typo3/sysext/dbal/ext_tables.sql [deleted file]
typo3/sysext/dbal/handlers/class.tx_dbal_handler_openoffice.php [deleted file]
typo3/sysext/dbal/handlers/class.tx_dbal_handler_rawmysql.php [deleted file]
typo3/sysext/dbal/handlers/class.tx_dbal_handler_xmldb.php [deleted file]
typo3/sysext/dbal/last_synched_target [deleted file]
typo3/sysext/dbal/lib/class.tx_dbal_sqlengine.php [deleted file]
typo3/sysext/dbal/lib/class.tx_dbal_tsparserext.php [deleted file]
typo3/sysext/dbal/mod1/clear.gif [deleted file]
typo3/sysext/dbal/mod1/conf.php [deleted file]
typo3/sysext/dbal/mod1/index.php [deleted file]
typo3/sysext/dbal/mod1/locallang.xml [deleted file]
typo3/sysext/dbal/mod1/locallang_mod.xml [deleted file]
typo3/sysext/dbal/mod1/moduleicon.gif [deleted file]
typo3/sysext/dbal/res/README [deleted file]
typo3/sysext/dbal/res/oracle/indexed_search.diff [deleted file]
typo3/sysext/dbal/res/oracle/realurl.diff [deleted file]
typo3/sysext/dbal/res/oracle/scheduler.diff [deleted file]
typo3/sysext/dbal/res/oracle/templavoila.diff [deleted file]
typo3/sysext/dbal/res/postgresql/postgresql-compatibility.sql [deleted file]
typo3/sysext/dbal/tests/BaseTestCase.php [deleted file]
typo3/sysext/dbal/tests/FakeDbConnection.php [deleted file]
typo3/sysext/dbal/tests/dbGeneralTest.php [deleted file]
typo3/sysext/dbal/tests/dbOracleTest.php [deleted file]
typo3/sysext/dbal/tests/fixtures/oci8.config.php [deleted file]
typo3/sysext/dbal/tests/sqlParserGeneralTest.php [deleted file]

index 685b147..6ee565e 100644 (file)
@@ -1,3 +1,6 @@
 [submodule "typo3/sysext/version"]
        path = typo3/sysext/version
        url = git://git.typo3.org/TYPO3v4/CoreProjects/workspaces/version.git
+[submodule "typo3/sysext/dbal"]
+       path = typo3/sysext/dbal
+       url = git://git.typo3.org/TYPO3v4/Extensions/dbal.git
diff --git a/typo3/sysext/dbal b/typo3/sysext/dbal
new file mode 160000 (submodule)
index 0000000..f9d2f03
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit f9d2f03293fa2f2b7e2a12de6d1247559c8d98b4
diff --git a/typo3/sysext/dbal/ChangeLog b/typo3/sysext/dbal/ChangeLog
deleted file mode 100644 (file)
index 75d0c40..0000000
+++ /dev/null
@@ -1,382 +0,0 @@
-2010-09-28  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Set version to 1.0.6
-
-2010-08-30  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Fixed bug #15582: Call to deprecated function template::middle()
-
-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-19  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Updated copyright year in manual
-
-2010-06-12  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Fixed bug #13431: Include BE:forceCharset config option (thanks to Armin Guenther)
-
-2010-06-11  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Fixed bug #14405: Rename the test cases from *_testcase to *Test
-
-2010-05-21  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Fixed bug #14372: Mapping does not work with table alias
-
-2010-05-01  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Fixed bug #2186: Error installing static_info_tables
-
-2010-04-22  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Fixed bug #14182: Multiple join conditions are not supported
-
-2010-04-13  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Set version to 1.0.5
-
-2010-03-07  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Fixed bug #4640: Backend login impossible with MSSQL via ODBC (thanks to Felix Eckhofer)
-
-2010-02-21  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Fixed bug #2367: No support for LIMIT [PostgreSQL]
-
-2010-02-14  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Set version to 1.0.4
-
-2010-02-14  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Added unit test for #12829: ALTER TABLE is not able to parse length restriction in index creation
-
-2010-02-13  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Fixed bug #13528: Argument 1 passed to ux_t3lib_DB::_quoteFieldNames() must be an array, string given
-
-2010-02-09  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Added unit test for bug #13490: Where clause 0=0 cannot be parsed
-
-2010-02-07  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Fixed bug #13453: Method compileINSERT of ux_t3lib_sqlparser should be protected
-
-2010-02-06  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Added unit tests for bug #13430: Cannot parse INSERT when VALUES has no space before left parenthesis
-
-2010-02-05  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Fixed bug #13422: Invalid quoting of numeric column names
-
-2010-01-14  Steffen Kamper  <info@sk-typo3.de>
-
-       * Fixed bug #13199: fileadminDir is hardcoded in several places (Thanks to Susanne Moog)
-
-2010-01-08  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Updated copyright year
-
-2009-12-30  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Set version to 1.0.3
-
-2009-12-28  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Fixed bug #13104: SQL parser cannot parse escaped single quote in INSERT statement
-
-2009-12-27  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Updated documentation: now using new documentation template
-       * Updated documentation: removed obsolete information, added small cookbook for extension developers, added tutorials for Oracle and PostgreSQL
-
-2009-12-13  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Fixed bug #13003: Move back methods belonging to t3lib_sqlparser
-
-2009-12-11  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Fixed bug #12897: Cannot parse SQL hints
-
-2009-11-29  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Set version to 1.0.2 [TYPO3 4.3.0]
-       * Fixed bug #12800: Add functionality to work with caching framework (support for "IN (subquery)" in where clause)
-       * Follow-up of changeset 26118: parts of initial patch for RFC 12231 had actually not been integrated
-
-2009-11-27  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Cleanup: Reorganized unit-tests
-
-2009-11-25  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Set version to 1.0.1
-
-2009-11-20  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Added unit-test for bug #5708: Fieldmapping doesn't work on the "right side" in where clause with table.field
-       * Fixed bugs #5044/#11142: Column's default value is not properly quoted in CREATE TABLE
-       * Added unit-test for bug #12670: Columns with NOT NULL are created as NULLable
-
-2009-11-17  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Set version to 1.0.0 (stable)
-       * Updated documentation: updated copyright and refreshed TOC
-       * Added unit-test for bug #4466: Index on tx_realurl_uniqalias breaks with DBAL
-
-2009-11-16  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Now using Core dispatcher for backend module (thanks to Oliver Hader)
-
-2009-11-15  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Fixed bug #12596: RIGHT OUTER JOIN is not supported
-
-2009-11-11  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Added unit test for bug #11093: bigint (int8) values get converted to int4 by int-cast 
-
-2009-11-10  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Removed comments stating that SQL parser is experimental
-       * Follow-up of revision 26334: LIKE on Oracle should use dbms_lob.instr() function
-       * Updated Oracle unit tests to use $GLOBALS['TYPO3_DB'] instead of a fixture to avoid side-effects on SQL rewriting
-       * Updated general database unit tests to use $GLOBALS['TYPO3_DB'] instead of a fixture to avoid side-effects on SQL rewriting
-
-2009-11-09  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Fixed bug #10965: Float database field gets converted to integer on insert (thanks to Christian Ducrot)
-       * Fixed bug #12515: DAM-related: CONCAT operator cannot be used after LIKE
-       * Fixed bug #10411: Applied missing chunks of patch
-
-2009-11-07  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Added unit test for RFC #6198: Problem with strings in IN
-       * Added unit test for RFC #6953: Mapping of fieldnames in SQL-functions like MIN(), MAX() or SUM() does not work
-
-2009-11-06  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Set version to 0.9.25
-       * Fixed bug: tables and fields were not always properly mapped in INNER JOINs
-       * Added unit tests to test quoting and remapping of tables and fields when using Oracle
-
-2009-11-05  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Set version to 0.9.24
-       * Follow-up of RFC #12452: Reflected change of visibility of method compileFieldCfg() in t3lib_sqlparser
-
-2009-11-04  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Updated ext_emconf.php's author and extension version dependencies
-
-2009-11-03  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Added some general unit tests (without any engine-specific test nor mapping)
-       * Cleanup #12440: Copy DBAL-only SQL parser methods from t3lib_sqlparser to ux_t3lib_sqlparser
-       * Fixed bug #12231: New caching framework (4.3-dev) does not work with DBAL
-
-2009-10-28  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Added compatibility operators for PostgreSQL as resource script (thanks to Ries van Twisk)
-       * Added message in Extension Manager to let users know compatibility scripts may need to be run
-
-2009-10-27  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Follow-up of changeset 25876: Using tx_dbal_sqlengine instead of t3lib_sqlengine for sample handlers
-       * Created icons for extension and Debug module
-       * Cleanup: Applied CGL
-
-2009-10-26  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Fixed bug #12354: Include t3lib_sqlengine from Core to DBAL
-       * Fixed bug #12349: Clean-up SQL parser and SQL engine
-
-2009-10-20  Oliver Hader  <oliver@typo3.org>
-
-       * Set version to 0.9.23
-
-2009-10-08  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Fixed bug #6953: Mapping of fieldnames in SQL-functions like MIN(), MAX() or SUM() does not work (Thanks to Christian and Michael Miousse)
-
-2009-10-01  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Raised version to 0.9.22
-
-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
-
-2009-09-18  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Raised version to 0.9.21
-
-2009-09-18  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Fixed bug #11984: Remove reference operators for objects
-
-2009-09-03  Xavier Perseguers  <typo3@perseguers.ch>
-
-       * Fixed bug #11436: Unknown tables break Install-Tool (Thanks to David Bruchmann)
-       * Fixed bug #11108: DBAL wildly quotes fields and table names
-
-2009-09-04  Karsten Dambekalns <karsten@typo3.org>
-
-       * Raised version to 0.9.20
-
-2008-02-04  Michael Stucki  <michael@typo3.org>
-
-       * Fixed bug #7295: Uninitialized variable in ->handler_getFromTableList() (Patch by Oliver Klee)
-
-2007-05-30  Karsten Dambekalns <karsten@typo3.org>
-
-       * Added default values and some usability improvements to cached info display in debug module (closes bug #3750)
-       * EXPLAIN PLAN support for Oracle (closes bug #3850)
-       * Fixed a warning when using admin_get_fields() on a non-existent table
-       * Fixed a bug causing inserts with more than one affected CLOB field to fail
-       * quoteWhereClause() now die()s when the input cannot be parsed by parseWhereClause()
-       * PHP backtraces can be logged with the queries now (closes bug #3856)
-
-2007-05-29  Karsten Dambekalns <karsten@typo3.org>
-
-       * Closes bug #4462: creates tables without OIDs on PostgreSQL now
-       * Closes bugs #4494, #3759: & is translated to BITAND() on Oracle now
-       * 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>
-
-       * Fixes SQL issues when searching in list view or with the global search box on the bottom of the BE page
-
-2006-06-30  Karsten Dambekalns <karsten@typo3.org>
-
-       * this update closes bugs #3638, #2106, #2866, #3754 (for Firefox, broken in MSIE) and maybe a few more
-       * Implemented support for sysLog() on connection failure
-       * DBAL now honours the no_pconnect setting
-       * For handlers in native mode the setDBinit queries are executed upon connection
-       * The initial value for generated sequences can be configured per handler, to avoid duplicate key errors after having imported data
-       * BLOB fields are handled correctly now during INSERT and UPDATE
-       * Setting $store_lastBuiltQuery acts like in t3lib_db now (fill $debug_lastBuiltQuery)
-       * For the native handler quoting methods directly return the input for speedup, as no quoting is needed in that case
-       * Added support for native and userdefined handler to MetaType()
-       * Changed mapping of types to always use the largest possible integer, map tinytext to varchar instead of text
-       * admin_get_tables() skips tables whose names match /BIN\$/ (coming from the recycle bin on Oracle)
-       * Importing dumps using the install tool now works, see manual for tips
-       * Changed the way NOT NULL and DEFAULT are handled when setting up tables, see manual for the rules that now apply
-       * Code cleanup (indentation, documentation)
-       * Updated the manual and added new content
-
-2006-01-19  Karsten Dambekalns <karsten@typo3.org>
-
-       * Changes to connection handling, detecting failed connections.
-       * Added support for $no_quote_fields in UPDATE and INSERT methods.
-
-2006-01-04  Karsten Dambekalns <karsten@typo3.org>
-
-       * Changed the way a connection is established with ADOdb. The new
-       way allows ODBC connections (rather, connections to drivers having
-       an underscore in their name).
-       * Changes to ext_tables.sql to make it more portable.
-       * When printing errors, output the offending SQL as well.
-       * Some small fixes, enhancements to code documentation.
-       * Some additions to the manual.
-
-2005-12-27  Karsten Dambekalns <karsten@typo3.org>
-
-       * Converted locallang to XML, small adaptions to syext location.
-       * One slight fix to the SQL check in the BE module (wrong output if
-       an error occurred).
-
-2005-12-26  Karsten Dambekalns <karsten@typo3.org>
-
-       * Code cleanup and improvements to the mapping. Merged 3rd
-       party changes done by DIACC GmbH.
-
-2005-12-23  Karsten Dambekalns <karsten@typo3.org>
-
-       * Fixed a few issues that were left undiscovered yet.
-       * Added a new module to test query building and parsing
-       from the DBAL debug module.
-       * Finalized fix for bug #1649.
-
-2005-12-22  Karsten Dambekalns <karsten@typo3.org>
-
-       * Fixed bug #2077 (NOT handling breaking, consequently
-       discarding WHERE clauses).
-
-2005-12-21  Karsten Dambekalns <karsten@typo3.org>
-
-       * Fixed bug #1781 to allow easier install.
-       * Closed bug #1204 as not reproducable. Probably rather a
-       PHP/Apache bug than a DBAL bug.
-       * Closed bug #1317 which has been fixed earlier. It was due
-       to a msissing check for the incoming SQL (string/array) in the
-       native part of exec_UPDATEquery().
-       * Fixed parseFieldDef() t3lib_sqlparser to allow datatypes
-       with just a trailing comma (like in "tyinytext," as opposed
-       to "varchar(19)". This prevented installation of some
-       extensions.
-       * Fixed bug #2072.
-       * Fixed bug #1206.
-       * Fixed a bug with error logging and array queries (BLOB).
-       * Prepared a fix for bug #1649, pending core list approval.
-       * Fixed a bug in t3lib_page, getMultipleGroupsWhereClause()
-       where double quotes were used to quote a literal for use in
-       SQL. THIS IS MYSQL-ONLY! NEVER DO THIS! ALWAYS USE SINGLE
-       QUOTES!
-
-2005-06-07  Karsten Dambekalns <karsten@typo3.org>
-
-       Documentation update.
-
-2005-05-19  Karsten Dambekalns <karsten@typo3.org>
-
-       Committed changes to go along with the library removal done
-       earlier. Completed debug logging.
-
-2005-02-07  Karsten Dambekalns <karsten@typo3.org>
-
-       Bringing the DBAL extension AS OF JANUARY 2005 into CVS.  Works
-       pretty well, but still needs more work. A few optimizations are
-       planned and some bugs in native mode need to be fixed. Checking
-       this in is (similar to yesterday's commit) more for
-       historic/archival reasons.  This version will NOT work with 3.7.x.
-       You have been warned.
-
-2005-02-06  Karsten Dambekalns <karsten@typo3.org>
-
-       Bringing the DBAL extension AS OF JULY 2004 into CVS. This is
-       rather for historic purposes, more changes will follow in the near
-       future.  This version was already a huge step forward, but it will
-       not work as expected with 3.7.x or 3.8.x. You have been warned.
-
-2004-03-28  Kasper Skaarhoej <kasperYYYY@typo3.com>
-
-       Initial revision
diff --git a/typo3/sysext/dbal/class.ux_db_list_extra.php b/typo3/sysext/dbal/class.ux_db_list_extra.php
deleted file mode 100644 (file)
index c721dee..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 1999-2009 Kasper Skaarhoj (kasperYYYY@typo3.com)
-*  (c) 2006-2009 Karsten Dambekalns <karsten@typo3.org>
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-*
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*  A copy is found in the textfile GPL.txt and important notices to the license
-*  from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-/**
- * Include file extending localRecordList for DBAL compatibility
- *
- * $Id: class.ux_db_list_extra.php 30033 2010-02-14 23:15:46Z xperseguers $
- *
- * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
- * @author     Karsten Dambekalns <k.dambekalns@fishfarm.de>
- */
-
-/**
- * Child class for rendering of Web > List (not the final class. see class.db_list_extra)
- *
- * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
- * @author     Karsten Dambekalns <k.dambekalns@fishfarm.de>
- * @package TYPO3
- * @subpackage DBAL
- */
-class ux_localRecordList extends localRecordList {
-
-       /**
-        * Creates part of query for searching after a word ($this->searchString) fields in input table
-        *
-        * DBAL specific: no LIKE for numeric fields, in this case "uid" (breaks on Oracle)
-        *                no LIKE for BLOB fields, skip
-        *
-        * @param       string          Table, in which the fields are being searched.
-        * @return      string          Returns part of WHERE-clause for searching, if applicable.
-        */
-       function makeSearchString($table) {
-                       // Make query, only if table is valid and a search string is actually defined:
-               if ($GLOBALS['TCA'][$table] && $this->searchString) {
-
-                               // Loading full table description - we need to traverse fields:
-                       t3lib_div::loadTCA($table);
-
-                               // Initialize field array:
-                       $sfields = array();
-                       $or = '';
-
-                               // add the uid only if input is numeric, cast to int
-                       if (is_numeric($this->searchString)) {
-                               $queryPart = ' AND (uid=' . (int)$this->searchString . ' OR ';
-                       } else {
-                               $queryPart = ' AND (';
-                       }
-
-                       if ($GLOBALS['TYPO3_DB']->runningADOdbDriver('oci8')) {
-                               foreach ($GLOBALS['TCA'][$table]['columns'] as $fieldName => $info) {
-                                       if ($GLOBALS['TYPO3_DB']->cache_fieldType[$table][$fieldName]['metaType'] === 'B') {
-                                               // skip, LIKE is not supported on BLOB columns...
-                                       } elseif ($info['config']['type'] === 'text' || ($info['config']['type'] === 'input' && !preg_match('/date|time|int/', $info['config']['eval']))) {
-                                               $queryPart .= $or . $fieldName . ' LIKE \'%' . $GLOBALS['TYPO3_DB']->quoteStr($this->searchString, $table) . '%\'';
-                                               $or = ' OR ';
-                                       }
-                               }
-                       } else {
-                                       // Traverse the configured columns and add all columns that can be searched
-                               foreach ($GLOBALS['TCA'][$table]['columns'] as $fieldName => $info) {
-                                       if ($info['config']['type'] === 'text' || ($info['config']['type'] === 'input' && !preg_match('/date|time|int/', $info['config']['eval']))) {
-                                               $sfields[] = $fieldName;
-                                       }
-                               }
-
-                                       // If search-fields were defined (and there always are) we create the query:
-                               if (count($sfields)) {
-                                       $like = ' LIKE \'%'.$GLOBALS['TYPO3_DB']->quoteStr($this->searchString, $table) . '%\'';                // Free-text
-                                       $queryPart .= implode($like . ' OR ', $sfields) . $like;
-                               }
-                       }
-
-                               // Return query:
-                       return $queryPart . ')';
-               }
-       }
-}
-
-
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dbal/class.ux_db_list_extra.php']) {
-       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dbal/class.ux_db_list_extra.php']);
-}
-
-?>
\ No newline at end of file
diff --git a/typo3/sysext/dbal/class.ux_t3lib_db.php b/typo3/sysext/dbal/class.ux_t3lib_db.php
deleted file mode 100644 (file)
index 9ba4e1c..0000000
+++ /dev/null
@@ -1,3038 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2004-2009 Kasper Skaarhoj (kasperYYYY@typo3.com)
-*  (c) 2004-2009 Karsten Dambekalns <karsten@typo3.org>
-*  (c) 2009-2010 Xavier Perseguers <typo3@perseguers.ch>
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-*
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*  A copy is found in the textfile GPL.txt and important notices to the license
-*  from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-/**
- * Contains a database abstraction layer class for TYPO3
- *
- * $Id: class.ux_t3lib_db.php 36761 2010-08-14 16:00:33Z xperseguers $
- *
- * @author     Kasper Skaarhoj <kasper@typo3.com>
- * @author     Karsten Dambekalns <k.dambekalns@fishfarm.de>
- * @author     Xavier Perseguers <typo3@perseguers.ch>
- */
-/**
- * [CLASS/FUNCTION INDEX of SCRIPT]
- *
- *
- *
- *  123: class ux_t3lib_DB extends t3lib_DB
- *  169:     function ux_t3lib_DB()
- *  184:     function initInternalVariables()
- *
- *              SECTION: Query Building (Overriding parent methods)
- *  217:     function exec_INSERTquery($table,$fields_values)
- *  275:     function exec_UPDATEquery($table,$where,$fields_values)
- *  334:     function exec_DELETEquery($table,$where)
- *  387:     function exec_SELECTquery($select_fields,$from_table,$where_clause,$groupBy = '',$orderBy = '',$limit = '')
- *
- *              SECTION: Creates an INSERT SQL-statement for $table from the array with field/value pairs $fields_values.
- *  533:     function SELECTquery($select_fields,$from_table,$where_clause,$groupBy = '',$orderBy = '',$limit = '')
- *  556:     function quoteSelectFields(&$select_fields)
- *  573:     function quoteFromTables(&$from_table)
- *  595:     function quoteWhereClause(&$where_clause)
- *  620:     function quoteGroupBy(&$groupBy)
- *  637:     function quoteOrderBy(&$orderBy)
- *
- *              SECTION: Various helper functions
- *  663:     function quoteStr($str, $table)
- *
- *              SECTION: SQL wrapper functions (Overriding parent methods)
- *  707:     function sql_error()
- *  734:     function sql_num_rows(&$res)
- *  760:     function sql_fetch_assoc(&$res)
- *  808:     function sql_fetch_row(&$res)
- *  842:     function sql_free_result(&$res)
- *  868:     function sql_insert_id()
- *  893:     function sql_affected_rows()
- *  919:     function sql_data_seek(&$res,$seek)
- *  946:     function sql_field_type(&$res,$pointer)
- *
- *              SECTION: Legacy functions, bound to _DEFAULT handler. (Overriding parent methods)
- *  987:     function sql($db,$query)
- *  999:     function sql_query($query)
- * 1035:     function sql_pconnect($TYPO3_db_host, $TYPO3_db_username, $TYPO3_db_password)
- * 1055:     function sql_select_db($TYPO3_db)
- *
- *              SECTION: SQL admin functions
- * 1086:     function admin_get_tables()
- * 1149:     function admin_get_fields($tableName)
- * 1210:     function admin_get_keys($tableName)
- * 1270:     function admin_query($query)
- *
- *              SECTION: Handler management
- * 1333:     function handler_getFromTableList($tableList)
- * 1379:     function handler_init($handlerKey)
- *
- *              SECTION: Table/Field mapping
- * 1488:     function map_needMapping($tableList,$fieldMappingOnly = FALSE)
- * 1524:     function map_assocArray($input,$tables,$rev = FALSE)
- * 1573:     function map_remapSELECTQueryParts(&$select_fields,&$from_table,&$where_clause,&$groupBy,&$orderBy)
- * 1615:     function map_sqlParts(&$sqlPartArray, $defaultTable)
- * 1650:     function map_genericQueryParsed(&$parsedQuery)
- * 1717:     function map_fieldNamesInArray($table,&$fieldArray)
- *
- *              SECTION: Debugging
- * 1758:     function debugHandler($function,$execTime,$inData)
- * 1823:     function debug_log($query,$ms,$data,$join,$errorFlag)
- * 1849:     function debug_explain($query)
- *
- * TOTAL FUNCTIONS: 41
- * (This index is automatically created/updated by the extension "extdeveval")
- *
- */
-/**
- * TYPO3 database abstraction layer
- *
- * @author     Kasper Skaarhoj <kasper@typo3.com>
- * @author     Karsten Dambekalns <k.dambekalns@fishfarm.de>
- * @package TYPO3
- * @subpackage tx_dbal
- */
-class ux_t3lib_DB extends t3lib_DB {
-
-               // Internal, static:
-       var $printErrors = FALSE;       // Enable output of SQL errors after query executions. Set through TYPO3_CONF_VARS, see init()
-       var $debug = FALSE;                     // Enable debug mode. Set through TYPO3_CONF_VARS, see init()
-       var $conf = array();            // Configuration array, copied from TYPO3_CONF_VARS in constructor.
-
-       var $mapping = array();         // See manual.
-       var $table2handlerKeys = array();       // See manual.
-       var $handlerCfg = array(        // See manual.
-           '_DEFAULT' => array(
-                               'type' => 'native',
-                               'config' => array(
-                                   'username' => '',   // Set by default (overridden)
-                                   'password' => '',   // Set by default (overridden)
-                                   'host' => '',       // Set by default (overridden)
-                                   'database' => '',   // Set by default (overridden)
-                                   'driver' => '',     // ONLY "adodb" type; eg. "mysql"
-                                   'sequenceStart' => 1,       // ONLY "adodb", first number in sequences/serials/...
-                                   'useNameQuote' => 0 // ONLY "adodb", whether to use NameQuote() method from ADOdb to quote names
-                               )
-           ),
-       );
-
-
-               // Internal, dynamic:
-       var $handlerInstance = array();                         // Contains instance of the handler objects as they are created. Exception is the native mySQL calls which are registered as an array with keys "handlerType" = "native" and "link" pointing to the link resource for the connection.
-       var $lastHandlerKey = '';                                       // Storage of the handler key of last ( SELECT) query - used for subsequent fetch-row calls etc.
-       var $lastQuery = '';                                            // Storage of last SELECT query
-       var $lastParsedAndMappedQueryArray = array();   // Query array, the last one parsed
-
-       var $resourceIdToTableNameMap = array();        // Mapping of resource ids to table names.
-
-               // Internal, caching:
-       var $cache_handlerKeyFromTableList = array();                   // Caching handlerKeys for table lists
-       var $cache_mappingFromTableList = array();                      // Caching mapping information for table lists
-       var $cache_autoIncFields = array(); // parsed SQL from standard DB dump file
-       var $cache_fieldType = array(); // field types for tables/fields
-       var $cache_primaryKeys = array(); // primary keys
-
-       /**
-        * SQL parser
-        *
-        * @var tx_dbal_sqlengine
-        */
-       var $SQLparser;
-
-       /**
-        * Installer
-        *
-        * @var t3lib_install
-        */
-       var $Installer;
-
-
-       /**
-        * Constructor.
-        * Creates SQL parser object and imports configuration from $TYPO3_CONF_VARS['EXTCONF']['dbal']
-        */
-       public function __construct() {
-                       // Set SQL parser object for internal use:
-               $this->SQLparser = t3lib_div::makeInstance('tx_dbal_sqlengine');
-               $this->Installer = t3lib_div::makeInstance('t3lib_install');
-
-                       // Set internal variables with configuration:
-               $this->conf = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['dbal'];
-               $this->initInternalVariables();
-       }
-
-       /**
-        * Setting internal variables from $this->conf.
-        *
-        * @return      void
-        */
-       protected function initInternalVariables() {
-                       // Set outside configuration:
-               if (isset($this->conf['mapping'])) {
-                       $this->mapping = $this->conf['mapping'];
-               }
-               if (isset($this->conf['table2handlerKeys'])) {
-                       $this->table2handlerKeys = $this->conf['table2handlerKeys'];
-               }
-               if (isset($this->conf['handlerCfg'])) {
-                       $this->handlerCfg = $this->conf['handlerCfg'];
-               }
-
-               $this->cacheFieldInfo();
-                       // Debugging settings:
-               $this->printErrors = $this->conf['debugOptions']['printErrors'] ? TRUE : FALSE;
-               $this->debug = $this->conf['debugOptions']['enabled'] ? TRUE : FALSE;
-       }
-
-       /**
-        * 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');
-               }
-       }
-
-       /**
-        * Caches the field information.
-        *
-        * @return void
-        */
-       public function cacheFieldInfo() {
-               $extSQL = '';
-               $parsedExtSQL = array();
-
-                       // try to fetch cached file first
-                       // file is removed when admin_query() is called
-               if (file_exists(PATH_typo3conf . 'temp_fieldInfo.php')) {
-                       $fdata = unserialize(t3lib_div::getUrl(PATH_typo3conf . 'temp_fieldInfo.php'));
-                       $this->cache_autoIncFields = $fdata['incFields'];
-                       $this->cache_fieldType = $fdata['fieldTypes'];
-                       $this->cache_primaryKeys = $fdata['primaryKeys'];
-               } else {
-                               // handle stddb.sql, parse and analyze
-                       $extSQL = t3lib_div::getUrl(PATH_site . 't3lib/stddb/tables.sql');
-                       $parsedExtSQL = $this->Installer->getFieldDefinitions_fileContent($extSQL);
-                       $this->analyzeFields($parsedExtSQL);
-
-                               // loop over all installed extensions
-                       foreach ($GLOBALS['TYPO3_LOADED_EXT'] as $ext => $v) {
-                               if (!is_array($v) || !isset($v['ext_tables.sql'])) {
-                                       continue;
-                               }
-
-                                       // fetch db dump (if any) and parse it, then analyze
-                               $extSQL = t3lib_div::getUrl($v['ext_tables.sql']);
-                               $parsedExtSQL = $this->Installer->getFieldDefinitions_fileContent($extSQL);
-                               $this->analyzeFields($parsedExtSQL);
-                       }
-
-                       $cachedFieldInfo = array('incFields' => $this->cache_autoIncFields, 'fieldTypes' => $this->cache_fieldType, 'primaryKeys' => $this->cache_primaryKeys);
-                       $cachedFieldInfo = serialize($this->mapCachedFieldInfo($cachedFieldInfo));
-
-                               // write serialized content to file
-                       t3lib_div::writeFile(PATH_typo3conf . 'temp_fieldInfo.php', $cachedFieldInfo);
-
-                       if (strcmp(t3lib_div::getUrl(PATH_typo3conf . 'temp_fieldInfo.php'), $cachedFieldInfo)) {
-                               die('typo3temp/temp_incfields.php was NOT updated properly (written content didn\'t match file content) - maybe write access problem?');
-                       }
-               }
-       }
-
-       /**
-        * Analyzes fields and adds the extracted information to the field type, auto increment and primary key info caches.
-        *
-        * @param array $parsedExtSQL The output produced by t3lib_install::getFieldDefinitions_fileContent()
-        * @return void
-        * @see t3lib_install::getFieldDefinitions_fileContent()
-        */
-       protected function analyzeFields($parsedExtSQL) {
-               foreach ($parsedExtSQL as $table => $tdef) {
-                       if (is_array($tdef['fields'])) {
-                               foreach ($tdef['fields'] as $field => $fdef) {
-                                       $fdef = $this->SQLparser->parseFieldDef($fdef);
-                                       $this->cache_fieldType[$table][$field]['type'] = $fdef['fieldType'];
-                                       $this->cache_fieldType[$table][$field]['metaType'] = $this->MySQLMetaType($fdef['fieldType']);
-                                       $this->cache_fieldType[$table][$field]['notnull'] = (isset($fdef['featureIndex']['NOTNULL']) && !$this->SQLparser->checkEmptyDefaultValue($fdef['featureIndex'])) ? 1 : 0;
-                                       if (isset($fdef['featureIndex']['DEFAULT'])) {
-                                               $default = $fdef['featureIndex']['DEFAULT']['value'][0];
-                                               if (isset($fdef['featureIndex']['DEFAULT']['value'][1])) {
-                                                       $default = $fdef['featureIndex']['DEFAULT']['value'][1] . $default . $fdef['featureIndex']['DEFAULT']['value'][1];
-                                               }
-                                               $this->cache_fieldType[$table][$field]['default'] = $default;
-                                       }
-                                       if (isset($fdef['featureIndex']['AUTO_INCREMENT'])) {
-                                               $this->cache_autoIncFields[$table] = $field;
-                                       }
-                                       if (isset($tdef['keys']['PRIMARY'])) {
-                                               $this->cache_primaryKeys[$table] = substr($tdef['keys']['PRIMARY'], 13, -1);
-                                       }
-                               }
-                       }
-               }
-       }
-
-       /**
-       * This function builds all definitions for mapped tables and fields
-       * @see cacheFieldInfo()
-       */
-       protected function mapCachedFieldInfo($fieldInfo) {
-               if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['dbal']['mapping'])) {
-                       foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['dbal']['mapping'] as $mappedTable => $mappedConf) {
-                               if (array_key_exists($mappedTable, $fieldInfo['incFields'])) {
-                                       $mappedTableAlias = $mappedConf['mapTableName'];
-                                       if (isset($mappedConf['mapFieldNames'][$fieldInfo['incFields'][$mappedTable]])) {
-                                               $fieldInfo['incFields'][$mappedTableAlias] = $mappedConf['mapFieldNames'][$fieldInfo['incFields'][$mappedTable]];
-                                       } else {
-                                               $fieldInfo['incFields'][$mappedTableAlias] = $fieldInfo['incFields'][$mappedTable];
-                                       }
-                               }
-
-                               if (array_key_exists($mappedTable, $fieldInfo['fieldTypes'])) {
-                                       foreach ($fieldInfo['fieldTypes'][$mappedTable] as $field => $fieldConf) {
-                                               $tempMappedFieldConf[$mappedConf['mapFieldNames'][$field]] = $fieldConf;
-                                       }
-
-                                       $fieldInfo['fieldTypes'][$mappedConf['mapTableName']] = $tempMappedFieldConf;
-                               }
-
-                               if (array_key_exists($mappedTable, $fieldInfo['primaryKeys'])) {
-                                       $mappedTableAlias = $mappedConf['mapTableName'];
-                                       if (isset($mappedConf['mapFieldNames'][$fieldInfo['primaryKeys'][$mappedTable]])) {
-                                               $fieldInfo['primaryKeys'][$mappedTableAlias] = $mappedConf['mapFieldNames'][$fieldInfo['primaryKeys'][$mappedTable]];
-                                       } else {
-                                               $fieldInfo['primaryKeys'][$mappedTableAlias] = $fieldInfo['primaryKeys'][$mappedTable];
-                                       }
-                               }
-                       }
-               }
-
-               return $fieldInfo;
-       }
-
-
-       /************************************
-       *
-       * Query Building (Overriding parent methods)
-       * These functions are extending counterparts in the parent class.
-       *
-       **************************************/
-
-       /* From the ADOdb documentation, this is what we do (_Execute for SELECT, _query for the other actions)
-
-       Execute() is the default way to run queries. You can use the low-level functions _Execute() and _query() to reduce query overhead.
-       Both these functions share the same parameters as Execute().
-
-       If you do not have any bind parameters or your database supports binding (without emulation), then you can call _Execute() directly.
-       Calling this function bypasses bind emulation. Debugging is still supported in _Execute().
-
-       If you do not require debugging facilities nor emulated binding, and do not require a recordset to be returned, then you can call _query.
-       This is great for inserts, updates and deletes. Calling this function bypasses emulated binding, debugging, and recordset handling. Either
-       the resultid, TRUE or FALSE are returned by _query().
-       */
-
-       /**
-        * Inserts a record for $table from the array with field/value pairs $fields_values.
-        *
-        * @param       string          Table name
-        * @param       array           Field values as key=>value pairs. Values will be escaped internally. Typically you would fill an array like "$insertFields" with 'fieldname'=>'value' and pass it to this function as argument.
-        * @param mixed    List/array of keys NOT to quote (eg. SQL functions)
-        * @return      mixed           Result from handler, usually TRUE when success and FALSE on failure
-        */
-       public function exec_INSERTquery($table, $fields_values, $no_quote_fields = '') {
-
-               if ($this->debug) {
-                       $pt = t3lib_div::milliseconds();
-               }
-
-                       // Do field mapping if needed:
-               $ORIG_tableName = $table;
-               if ($tableArray = $this->map_needMapping($table)) {
-
-                               // Field mapping of array:
-                       $fields_values = $this->map_assocArray($fields_values, $tableArray);
-
-                               // Table name:
-                       if ($this->mapping[$table]['mapTableName']) {
-                               $table = $this->mapping[$table]['mapTableName'];
-                       }
-               }
-                       // Select API:
-               $this->lastHandlerKey = $this->handler_getFromTableList($ORIG_tableName);
-               switch ((string)$this->handlerCfg[$this->lastHandlerKey]['type']) {
-                       case 'native':
-                               $this->lastQuery = $this->INSERTquery($table,$fields_values,$no_quote_fields);
-                               if (is_string($this->lastQuery)) {
-                                       $sqlResult = mysql_query($this->lastQuery, $this->handlerInstance[$this->lastHandlerKey]['link']);
-                               } else {
-                                       $sqlResult = mysql_query($this->lastQuery[0], $this->handlerInstance[$this->lastHandlerKey]['link']);
-                                       foreach ($this->lastQuery[1] as $field => $content) {
-                                               mysql_query('UPDATE ' . $this->quoteFromTables($table) . ' SET ' . $this->quoteFromTables($field) . '=' . $this->fullQuoteStr($content, $table) . ' WHERE ' . $this->quoteWhereClause($where), $this->handlerInstance[$this->lastHandlerKey]['link']);
-                                       }
-                               }
-                               break;
-                       case 'adodb':
-                                       // auto generate ID for auto_increment fields if not present (static import needs this!)
-                                       // should we check the table name here (static_*)?
-                               if (isset($this->cache_autoIncFields[$table])) {
-                                       if (isset($fields_values[$this->cache_autoIncFields[$table]])) {
-                                               $new_id = $fields_values[$this->cache_autoIncFields[$table]];
-                                               if ($table != 'tx_dbal_debuglog') {
-                                                       $this->handlerInstance[$this->lastHandlerKey]->last_insert_id = $new_id;
-                                               }
-                                       } else {
-                                               $new_id = $this->handlerInstance[$this->lastHandlerKey]->GenID($table.'_'.$this->cache_autoIncFields[$table], $this->handlerInstance[$this->lastHandlerKey]->sequenceStart);
-                                               $fields_values[$this->cache_autoIncFields[$table]] = $new_id;
-                                               if ($table != 'tx_dbal_debuglog') {
-                                                       $this->handlerInstance[$this->lastHandlerKey]->last_insert_id = $new_id;
-                                               }
-                                       }
-                               }
-
-                               $this->lastQuery = $this->INSERTquery($table,$fields_values,$no_quote_fields);
-                               if (is_string($this->lastQuery)) {
-                                       $sqlResult = $this->handlerInstance[$this->lastHandlerKey]->_query($this->lastQuery,FALSE);
-                               } else {
-                                       $this->handlerInstance[$this->lastHandlerKey]->StartTrans();
-                                       if (strlen($this->lastQuery[0])) {
-                                               $sqlResult = $this->handlerInstance[$this->lastHandlerKey]->_query($this->lastQuery[0],FALSE);
-                                       }
-                                       if (is_array($this->lastQuery[1])) {
-                                               foreach ($this->lastQuery[1] as $field => $content) {
-                                                       if (empty($content)) continue;
-
-                                                       if (isset($this->cache_autoIncFields[$table]) && isset($new_id)) {
-                                                               $this->handlerInstance[$this->lastHandlerKey]->UpdateBlob($this->quoteFromTables($table),$field,$content,$this->quoteWhereClause($this->cache_autoIncFields[$table].'='.$new_id));
-                                                       } elseif (isset($this->cache_primaryKeys[$table])) {
-                                                               $where = '';
-                                                               $pks = explode(',', $this->cache_primaryKeys[$table]);
-                                                               foreach ($pks as $pk) {
-                                                                       if (isset($fields_values[$pk]))
-                                                                       $where .= $pk.'='.$this->fullQuoteStr($fields_values[$pk], $table).' AND ';
-                                                               }
-                                                               $where = $this->quoteWhereClause($where.'1=1');
-                                                               $this->handlerInstance[$this->lastHandlerKey]->UpdateBlob($this->quoteFromTables($table),$field,$content,$where);
-                                                       } else {
-                                                               $this->handlerInstance[$this->lastHandlerKey]->CompleteTrans(FALSE);
-                                                               die('Could not update BLOB >>>> no WHERE clause found!'); // should never ever happen
-                                                       }
-                                               }
-                                       }
-                                       if (is_array($this->lastQuery[2])) {
-                                               foreach ($this->lastQuery[2] as $field => $content) {
-                                                       if (empty($content)) continue;
-
-                                                       if (isset($this->cache_autoIncFields[$table]) && isset($new_id)) {
-                                                               $this->handlerInstance[$this->lastHandlerKey]->UpdateClob($this->quoteFromTables($table),$field,$content,$this->quoteWhereClause($this->cache_autoIncFields[$table].'='.$new_id));
-                                                       } elseif (isset($this->cache_primaryKeys[$table])) {
-                                                               $where = '';
-                                                               $pks = explode(',', $this->cache_primaryKeys[$table]);
-                                                               foreach ($pks as $pk) {
-                                                                       if (isset($fields_values[$pk]))
-                                                                       $where .= $pk.'='.$this->fullQuoteStr($fields_values[$pk], $table).' AND ';
-                                                               }
-                                                               $where = $this->quoteWhereClause($where.'1=1');
-                                                               $this->handlerInstance[$this->lastHandlerKey]->UpdateClob($this->quoteFromTables($table),$field,$content,$where);
-                                                       } else {
-                                                               $this->handlerInstance[$this->lastHandlerKey]->CompleteTrans(FALSE);
-                                                               die('Could not update CLOB >>>> no WHERE clause found!'); // should never ever happen
-                                                       }
-                                               }
-                                       }
-                                       $this->handlerInstance[$this->lastHandlerKey]->CompleteTrans();
-                               }
-                               break;
-                       case 'userdefined':
-                               $sqlResult = $this->handlerInstance[$this->lastHandlerKey]->exec_INSERTquery($table,$fields_values,$no_quote_fields);
-                               break;
-               }
-
-               if ($this->printErrors && $this->sql_error()) {
-                       debug(array($this->lastQuery, $this->sql_error()));
-               }
-
-               if ($this->debug) {
-                       $this->debugHandler(
-                               'exec_INSERTquery',
-                               t3lib_div::milliseconds()-$pt,
-                               array(
-                                       'handlerType' => $hType,
-                                       'args' => array($table,$fields_values),
-                                       'ORIG_tablename' => $ORIG_tableName
-                               )
-                       );
-               }
-                       // Return output:
-               return $sqlResult;
-       }
-
-       /**
-        * Updates a record from $table
-        *
-        * @param       string          Database tablename
-        * @param       string          WHERE clause, eg. "uid=1". NOTICE: You must escape values in this argument with $this->fullQuoteStr() yourself!
-        * @param       array           Field values as key=>value pairs. Values will be escaped internally. Typically you would fill an array like "$updateFields" with 'fieldname'=>'value' and pass it to this function as argument.
-        * @param mixed    List/array of keys NOT to quote (eg. SQL functions)
-        * @return      mixed           Result from handler, usually TRUE when success and FALSE on failure
-        */
-       public function exec_UPDATEquery($table,$where,$fields_values,$no_quote_fields = '') {
-               if ($this->debug) {
-                       $pt = t3lib_div::milliseconds();
-               }
-
-                       // Do table/field mapping:
-               $ORIG_tableName = $table;
-               if ($tableArray = $this->map_needMapping($table)) {
-
-                               // Field mapping of array:
-                       $fields_values = $this->map_assocArray($fields_values,$tableArray);
-
-                               // Where clause table and field mapping:
-                       $whereParts = $this->SQLparser->parseWhereClause($where);
-                       $this->map_sqlParts($whereParts,$tableArray[0]['table']);
-                       $where = $this->SQLparser->compileWhereClause($whereParts, FALSE);
-
-                               // Table name:
-                       if ($this->mapping[$table]['mapTableName']) {
-                               $table = $this->mapping[$table]['mapTableName'];
-                       }
-               }
-
-                       // Select API
-               $this->lastHandlerKey = $this->handler_getFromTableList($ORIG_tableName);
-               switch ((string)$this->handlerCfg[$this->lastHandlerKey]['type']) {
-                       case 'native':
-                               $this->lastQuery = $this->UPDATEquery($table,$where,$fields_values,$no_quote_fields);
-                               if (is_string($this->lastQuery)) {
-                                       $sqlResult = mysql_query($this->lastQuery, $this->handlerInstance[$this->lastHandlerKey]['link']);
-                               }
-                               else {
-                                       $sqlResult = mysql_query($this->lastQuery[0], $this->handlerInstance[$this->lastHandlerKey]['link']);
-                                       foreach ($this->lastQuery[1] as $field => $content) {
-                                               mysql_query('UPDATE '.$this->quoteFromTables($table).' SET '.$this->quoteFromTables($field).'='.$this->fullQuoteStr($content,$table).' WHERE '.$this->quoteWhereClause($where), $this->handlerInstance[$this->lastHandlerKey]['link']);
-                                       }
-                               }
-                       break;
-                       case 'adodb':
-                               $this->lastQuery = $this->UPDATEquery($table,$where,$fields_values,$no_quote_fields);
-                               if (is_string($this->lastQuery)) {
-                                       $sqlResult = $this->handlerInstance[$this->lastHandlerKey]->_query($this->lastQuery,FALSE);
-                               } else {
-                                       $this->handlerInstance[$this->lastHandlerKey]->StartTrans();
-                                       if (strlen($this->lastQuery[0])) {
-                                               $sqlResult = $this->handlerInstance[$this->lastHandlerKey]->_query($this->lastQuery[0],FALSE);
-                                       }
-                                       if (is_array($this->lastQuery[1])) {
-                                               foreach ($this->lastQuery[1] as $field => $content) {
-                                                       $this->handlerInstance[$this->lastHandlerKey]->UpdateBlob($this->quoteFromTables($table),$field,$content,$this->quoteWhereClause($where));
-                                               }
-                                       }
-                                       if (is_array($this->lastQuery[2])) {
-                                               foreach ($this->lastQuery[2] as $field => $content) {
-                                                       $this->handlerInstance[$this->lastHandlerKey]->UpdateClob($this->quoteFromTables($table),$field,$content,$this->quoteWhereClause($where));
-                                               }
-                                       }
-                                       $this->handlerInstance[$this->lastHandlerKey]->CompleteTrans();
-                               }
-                               break;
-                       case 'userdefined':
-                               $sqlResult = $this->handlerInstance[$this->lastHandlerKey]->exec_UPDATEquery($table,$where,$fields_values,$no_quote_fields);
-                               break;
-               }
-
-               if ($this->printErrors && $this->sql_error()) {
-                       debug(array($this->lastQuery, $this->sql_error()));
-               }
-
-               if ($this->debug) {
-                       $this->debugHandler(
-                               'exec_UPDATEquery',
-                               t3lib_div::milliseconds()-$pt,
-                               array(
-                                       'handlerType' => $hType,
-                                       'args' => array($table,$where, $fields_values),
-                                       'ORIG_from_table' => $ORIG_tableName
-                               )
-                       );
-               }
-
-                       // Return result:
-               return $sqlResult;
-       }
-
-       /**
-        * Deletes records from table
-        *
-        * @param       string          Database tablename
-        * @param       string          WHERE clause, eg. "uid=1". NOTICE: You must escape values in this argument with $this->fullQuoteStr() yourself!
-        * @return      mixed           Result from handler
-        */
-       public function exec_DELETEquery($table, $where) {
-               if ($this->debug) {
-                       $pt = t3lib_div::milliseconds();
-               }
-
-                       // Do table/field mapping:
-               $ORIG_tableName = $table;
-               if ($tableArray = $this->map_needMapping($table)) {
-
-                               // Where clause:
-                       $whereParts = $this->SQLparser->parseWhereClause($where);
-                       $this->map_sqlParts($whereParts,$tableArray[0]['table']);
-                       $where = $this->SQLparser->compileWhereClause($whereParts, FALSE);
-
-                               // Table name:
-                       if ($this->mapping[$table]['mapTableName']) {
-                               $table = $this->mapping[$table]['mapTableName'];
-                       }
-               }
-
-                       // Select API
-               $this->lastHandlerKey = $this->handler_getFromTableList($ORIG_tableName);
-               switch ((string)$this->handlerCfg[$this->lastHandlerKey]['type']) {
-                       case 'native':
-                               $this->lastQuery = $this->DELETEquery($table,$where);
-                               $sqlResult = mysql_query($this->lastQuery, $this->handlerInstance[$this->lastHandlerKey]['link']);
-                               break;
-                       case 'adodb':
-                               $this->lastQuery = $this->DELETEquery($table,$where);
-                               $sqlResult = $this->handlerInstance[$this->lastHandlerKey]->_query($this->lastQuery,FALSE);
-                               break;
-                       case 'userdefined':
-                               $sqlResult = $this->handlerInstance[$this->lastHandlerKey]->exec_DELETEquery($table,$where);
-                               break;
-               }
-
-               if ($this->printErrors && $this->sql_error()) {
-                       debug(array($this->lastQuery, $this->sql_error()));
-               }
-
-               if ($this->debug) {
-                       $this->debugHandler(
-                               'exec_DELETEquery',
-                               t3lib_div::milliseconds()-$pt,
-                               array(
-                                       'handlerType' => $hType,
-                                       'args' => array($table,$where),
-                                       'ORIG_from_table' => $ORIG_tableName
-                               )
-                       );
-               }
-
-                       // Return result:
-               return $sqlResult;
-       }
-
-       /**
-        * Selects records from Data Source
-        *
-        * @param       string $select_fields List of fields to select from the table. This is what comes right after "SELECT ...". Required value.
-        * @param       string $from_table Table(s) from which to select. This is what comes right after "FROM ...". Required value.
-        * @param       string $where_clause Optional additional WHERE clauses put in the end of the query. NOTICE: You must escape values in this argument with $this->fullQquoteStr() yourself! DO NOT PUT IN GROUP BY, ORDER BY or LIMIT!
-        * @param       string $groupBy Optional GROUP BY field(s), if none, supply blank string.
-        * @param       string $orderBy Optional ORDER BY field(s), if none, supply blank string.
-        * @param       string $limit Optional LIMIT value ([begin,]max), if none, supply blank string.
-        * @return      mixed           Result from handler. Typically object from DBAL layers.
-        */
-       public function exec_SELECTquery($select_fields, $from_table, $where_clause, $groupBy = '', $orderBy = '', $limit = '') {
-               if ($this->debug) {
-                       $pt = t3lib_div::milliseconds();
-               }
-
-                       // Map table / field names if needed:
-               $ORIG_tableName = $from_table;  // Saving table names in $ORIG_from_table since $from_table is transformed beneath:
-               if ($tableArray = $this->map_needMapping($ORIG_tableName)) {
-                       $this->map_remapSELECTQueryParts($select_fields,$from_table,$where_clause,$groupBy,$orderBy);   // Variables passed by reference!
-               }
-
-                       // Get handler key and select API:
-               $this->lastHandlerKey = $this->handler_getFromTableList($ORIG_tableName);
-               $hType = (string)$this->handlerCfg[$this->lastHandlerKey]['type'];
-               switch ($hType) {
-                       case 'native':
-                               $this->lastQuery = $this->SELECTquery($select_fields,$from_table,$where_clause,$groupBy,$orderBy,$limit);
-                               $sqlResult = mysql_query($this->lastQuery, $this->handlerInstance[$this->lastHandlerKey]['link']);
-                               $this->resourceIdToTableNameMap[(string)$sqlResult] = $ORIG_tableName;
-                               break;
-                       case 'adodb':
-                               if ($limit != '') {
-                                       $splitLimit = t3lib_div::intExplode(',', $limit);               // Splitting the limit values:
-                                       if ($splitLimit[1]) {   // If there are two parameters, do mapping differently than otherwise:
-                                               $numrows = $splitLimit[1];
-                                               $offset = $splitLimit[0];
-                                       } else {
-                                               $numrows = $splitLimit[0];
-                                               $offset = 0;
-                                       }
-
-                                       $sqlResult = $this->handlerInstance[$this->lastHandlerKey]->SelectLimit($this->SELECTquery($select_fields,$from_table,$where_clause,$groupBy,$orderBy), $numrows, $offset);
-                                       $this->lastQuery = $sqlResult->sql;
-                               } else {
-                                       $this->lastQuery = $this->SELECTquery($select_fields,$from_table,$where_clause,$groupBy,$orderBy);
-                                       $sqlResult = $this->handlerInstance[$this->lastHandlerKey]->_Execute($this->lastQuery);
-                               }
-
-                               $sqlResult->TYPO3_DBAL_handlerType = 'adodb';   // Setting handler type in result object (for later recognition!)
-                               $sqlResult->TYPO3_DBAL_tableList = $ORIG_tableName;
-                               break;
-                       case 'userdefined':
-                               $sqlResult = $this->handlerInstance[$this->lastHandlerKey]->exec_SELECTquery($select_fields,$from_table,$where_clause,$groupBy,$orderBy,$limit);
-                               if (is_object($sqlResult)) {
-                                       $sqlResult->TYPO3_DBAL_handlerType = 'userdefined';     // Setting handler type in result object (for later recognition!)
-                                       $sqlResult->TYPO3_DBAL_tableList = $ORIG_tableName;
-                               }
-                               break;
-               }
-
-               if ($this->printErrors && $this->sql_error()) {
-                       debug(array($this->lastQuery, $this->sql_error()));
-               }
-
-               if ($this->debug) {
-                       $this->debugHandler(
-                               'exec_SELECTquery',
-                               t3lib_div::milliseconds()-$pt,
-                               array(
-                                       'handlerType' => $hType,
-                                       'args' => array($from_table,$select_fields,$where_clause,$groupBy,$orderBy,$limit),
-                                       'ORIG_from_table' => $ORIG_tableName
-                               )
-                       );
-               }
-
-                       // Return result handler.
-               return $sqlResult;
-       }
-
-
-
-       /**************************************
-       *
-       * Query building
-       *
-       **************************************/
-
-       /**
-        * Creates an INSERT SQL-statement for $table from the array with field/value pairs $fields_values.
-        * Usage count/core: 4
-        *
-        * @param       string          See exec_INSERTquery()
-        * @param       array           See exec_INSERTquery()
-        * @param mixed         See exec_INSERTquery()
-        * @return      mixed           Full SQL query for INSERT as string or array (unless $fields_values does not contain any elements in which case it will be FALSE). If BLOB fields will be affected and one is not running the native type, an array will be returned, where 0 => plain SQL, 1 => fieldname/value pairs of BLOB fields
-        */
-       public function INSERTquery($table, $fields_values, $no_quote_fields = '') {
-                       // Table and fieldnames should be "SQL-injection-safe" when supplied to this function (contrary to values in the arrays which may be insecure).
-               if (is_array($fields_values) && count($fields_values)) {
-
-                       if (is_string($no_quote_fields)) {
-                               $no_quote_fields = explode(',', $no_quote_fields);
-                       } elseif (!is_array($no_quote_fields)) {
-                               $no_quote_fields = array();
-                       }
-
-                       $blobfields = array();
-                       $nArr = array();
-                       foreach ($fields_values as $k => $v) {
-                               if (!$this->runningNative() && $this->sql_field_metatype($table, $k) == 'B') {
-                                               // we skip the field in the regular INSERT statement, it is only in blobfields
-                                       $blobfields[$this->quoteFieldNames($k)] = $v;
-                               } elseif (!$this->runningNative() && $this->sql_field_metatype($table, $k) == 'XL') {
-                                               // we skip the field in the regular INSERT statement, it is only in clobfields
-                                       $clobfields[$this->quoteFieldNames($k)] = $v;
-                               } else {
-                                               // Add slashes old-school:
-                                               // cast numerical values
-                                       $mt = $this->sql_field_metatype($table, $k);
-                                       if ($mt{0} == 'I') {
-                                               $v = (int)$v;
-                                       } else if ($mt{0} == 'F') {
-                                               $v = (double)$v;
-                                       }
-
-                                       $nArr[$this->quoteFieldNames($k)] = (!in_array($k,$no_quote_fields)) ? $this->fullQuoteStr($v, $table) : $v;
-                               }
-                       }
-
-                       if (count($blobfields) || count($clobfields)) {
-                               if (count($nArr)) {
-                                       $query[0] = 'INSERT INTO ' . $this->quoteFromTables($table) . '
-                                       (
-                                               ' . implode(',
-                                               ', array_keys($nArr)) . '
-                                       ) VALUES (
-                                               ' . implode(',
-                                               ', $nArr) . '
-                                       )';
-                               }
-                               if (count($blobfields)) $query[1] = $blobfields;
-                               if (count($clobfields)) $query[2] = $clobfields;
-                               if ($this->debugOutput || $this->store_lastBuiltQuery) $this->debug_lastBuiltQuery = $query[0];
-                       } else {
-                               $query = 'INSERT INTO '.$this->quoteFromTables($table).'
-                               (
-                                       ' . implode(',
-                                       ', array_keys($nArr)) . '
-                               ) VALUES (
-                                       ' . implode(',
-                                       ', $nArr) . '
-                               )';
-
-                               if ($this->debugOutput || $this->store_lastBuiltQuery) $this->debug_lastBuiltQuery = $query;
-                       }
-
-                       return $query;
-               }
-       }
-
-       /**
-        * Creates an UPDATE SQL-statement for $table where $where-clause (typ. 'uid=...') from the array with field/value pairs $fields_values.
-        * Usage count/core: 6
-        *
-        * @param       string          See exec_UPDATEquery()
-        * @param       string          See exec_UPDATEquery()
-        * @param       array           See exec_UPDATEquery()
-        * @param mixed         See exec_UPDATEquery()
-        * @return      mixed           Full SQL query for UPDATE as string or array (unless $fields_values does not contain any elements in which case it will be FALSE). If BLOB fields will be affected and one is not running the native type, an array will be returned, where 0 => plain SQL, 1 => fieldname/value pairs of BLOB fields
-        */
-       public function UPDATEquery($table, $where, $fields_values, $no_quote_fields = '') {
-                       // Table and fieldnames should be "SQL-injection-safe" when supplied to this function (contrary to values in the arrays which may be insecure).
-               if (is_string($where)) {
-                       if (is_array($fields_values) && count($fields_values)) {
-
-                               if (is_string($no_quote_fields)) {
-                                       $no_quote_fields = explode(',', $no_quote_fields);
-                               } elseif (!is_array($no_quote_fields)) {
-                                       $no_quote_fields = array();
-                               }
-
-                               $blobfields = array();
-                               $nArr = array();
-                               foreach ($fields_values as $k => $v) {
-                                       if (!$this->runningNative() && $this->sql_field_metatype($table, $k) == 'B') {
-                                                       // we skip the field in the regular UPDATE statement, it is only in blobfields
-                                               $blobfields[$this->quoteFieldNames($k)] = $v;
-                                       } elseif (!$this->runningNative() && $this->sql_field_metatype($table, $k) == 'XL') {
-                                                               // we skip the field in the regular UPDATE statement, it is only in clobfields
-                                                       $clobfields[$this->quoteFieldNames($k)] = $v;
-                                       } else {
-                                                       // Add slashes old-school:
-                                                       // cast numeric values
-                                               $mt = $this->sql_field_metatype($table, $k);
-                                               if ($mt{0} == 'I') {
-                                                       $v = (int)$v;
-                                               } else if ($mt{0} == 'F') {
-                                                       $v = (double)$v;
-                                               }
-                                               $nArr[] = $this->quoteFieldNames($k) . '=' . ((!in_array($k, $no_quote_fields)) ? $this->fullQuoteStr($v, $table) : $v);
-                                       }
-                               }
-
-                               if (count($blobfields) || count($clobfields)) {
-                                       if (count($nArr)) {
-                                               $query[0] = 'UPDATE '.$this->quoteFromTables($table).'
-                                               SET
-                                                       '.implode(',
-                                                       ',$nArr).
-                                                       (strlen($where)>0 ? '
-                                               WHERE
-                                                       '.$this->quoteWhereClause($where) : '');
-                                       }
-                                       if (count($blobfields)) $query[1] = $blobfields;
-                                       if (count($clobfields)) $query[2] = $clobfields;
-                                       if ($this->debugOutput || $this->store_lastBuiltQuery) $this->debug_lastBuiltQuery = $query[0];
-                               } else {
-                                       $query = 'UPDATE '.$this->quoteFromTables($table).'
-                                       SET
-                                               '.implode(',
-                                               ',$nArr).
-                                               (strlen($where)>0 ? '
-                                       WHERE
-                                               '.$this->quoteWhereClause($where) : '');
-
-                                               if ($this->debugOutput || $this->store_lastBuiltQuery) $this->debug_lastBuiltQuery = $query;
-                               }
-
-                               return $query;
-                       }
-               } else {
-                       die('<strong>TYPO3 Fatal Error:</strong> "Where" clause argument for UPDATE query was not a string in $this->UPDATEquery() !');
-               }
-       }
-
-       /**
-        * Creates a DELETE SQL-statement for $table where $where-clause
-        * Usage count/core: 3
-        *
-        * @param       string          See exec_DELETEquery()
-        * @param       string          See exec_DELETEquery()
-        * @return      string          Full SQL query for DELETE
-        */
-       public function DELETEquery($table, $where) {
-               if (is_string($where)) {
-                       $table = $this->quoteFromTables($table);
-                       $where = $this->quoteWhereClause($where);
-
-                       $query = parent::DELETEquery($table, $where);
-
-                       if ($this->debugOutput || $this->store_lastBuiltQuery) $this->debug_lastBuiltQuery = $query;
-                       return $query;
-               } else {
-                       die('<strong>TYPO3 Fatal Error:</strong> "Where" clause argument for DELETE query was not a string in $this->DELETEquery() !');
-               }
-       }
-
-       /**
-        * Creates a SELECT SQL-statement
-        * Usage count/core: 11
-        *
-        * @param       string          See exec_SELECTquery()
-        * @param       string          See exec_SELECTquery()
-        * @param       string          See exec_SELECTquery()
-        * @param       string          See exec_SELECTquery()
-        * @param       string          See exec_SELECTquery()
-        * @param       string          See exec_SELECTquery()
-        * @return      string          Full SQL query for SELECT
-        */
-       public function SELECTquery($select_fields, $from_table, $where_clause, $groupBy = '', $orderBy = '', $limit = '') {
-               $this->lastHandlerKey = $this->handler_getFromTableList($from_table);
-               $hType = (string)$this->handlerCfg[$this->lastHandlerKey]['type'];
-               if ($hType === 'adodb' && $this->runningADOdbDriver('postgres')) {
-                               // Possibly rewrite the LIMIT to be PostgreSQL-compatible
-                       $splitLimit = t3lib_div::intExplode(',', $limit);               // Splitting the limit values:
-                       if ($splitLimit[1]) {   // If there are two parameters, do mapping differently than otherwise:
-                               $numrows = $splitLimit[1];
-                               $offset = $splitLimit[0];
-                               $limit = $numrows . ' OFFSET ' . $offset;
-                       }
-               }
-
-               $select_fields = $this->quoteFieldNames($select_fields);
-               $from_table = $this->quoteFromTables($from_table);
-               $where_clause = $this->quoteWhereClause($where_clause);
-               $groupBy = $this->quoteGroupBy($groupBy);
-               $orderBy = $this->quoteOrderBy($orderBy);
-
-                       // Call parent method to build actual query
-               $query = parent::SELECTquery($select_fields,$from_table,$where_clause,$groupBy,$orderBy,$limit);
-
-               if ($this->debugOutput || $this->store_lastBuiltQuery) $this->debug_lastBuiltQuery = $query;
-
-               return $query;
-       }
-
-
-       /**************************************
-       *
-       * Functions for quoting table/field names
-       *
-       **************************************/
-
-       /**
-        * Quotes components of a SELECT subquery.
-        *
-        * @param array $components     Array of SQL query components
-        * @return array
-        */
-       protected function quoteSELECTsubquery(array $components) {
-               $components['SELECT'] = $this->_quoteFieldNames($components['SELECT']);
-               $components['FROM'] = $this->_quoteFromTables($components['FROM']);
-               $components['WHERE'] = $this->_quoteWhereClause($components['WHERE']);
-               return $components;
-       }
-
-       /**
-        * Quotes field (and table) names with the quote character suitable for the DB being used
-        * Use quoteFieldNames instead!
-        *
-        * @param       string          List of fields to be selected from DB
-        * @return      string          Quoted list of fields to be selected from DB
-        * @deprecated since TYPO3 4.0
-        */
-       public function quoteSelectFields($select_fields) {
-               $this->quoteFieldNames($select_fields);
-       }
-
-       /**
-        * Quotes field (and table) names with the quote character suitable for the DB being used
-        *
-        * @param       string          List of fields to be used in query to DB
-        * @return      string          Quoted list of fields to be in query to DB
-        */
-       public function quoteFieldNames($select_fields) {
-               if ($select_fields == '') return '';
-               if ($this->runningNative()) return $select_fields;
-
-               $select_fields = $this->SQLparser->parseFieldList($select_fields);
-               if ($this->SQLparser->parse_error) {
-                       die($this->SQLparser->parse_error . ' in ' . __FILE__ . ' : ' . __LINE__);
-               }
-               $select_fields = $this->_quoteFieldNames($select_fields);
-
-               return $this->SQLparser->compileFieldList($select_fields);
-       }
-
-       /**
-        * Quotes field (and table) names in a SQL SELECT clause acccording to DB rules
-        *
-        * @param array $select_fields The parsed fields to quote
-        * @return array
-        * @see quoteFieldNames()
-        */
-       protected function _quoteFieldNames(array $select_fields) {
-               foreach ($select_fields as $k => $v) {
-                       if ($select_fields[$k]['field'] != '' && $select_fields[$k]['field'] != '*' && !is_numeric($select_fields[$k]['field'])) {
-                               $select_fields[$k]['field'] = $this->quoteName($select_fields[$k]['field']);
-                       }
-                       if ($select_fields[$k]['table'] != '' && !is_numeric($select_fields[$k]['table'])) {
-                               $select_fields[$k]['table'] = $this->quoteName($select_fields[$k]['table']);
-                       }
-                       if ($select_fields[$k]['as'] != '') {
-                               $select_fields[$k]['as'] = $this->quoteName($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']);
-                               $select_fields[$k]['func_content'] = $this->quoteFieldNames($select_fields[$k]['func_content']);
-                       }
-               }
-
-               return $select_fields;
-       }
-
-       /**
-        * Quotes table names with the quote character suitable for the DB being used
-        *
-        * @param       string          List of tables to be selected from DB
-        * @return      string          Quoted list of tables to be selected from DB
-        */
-       public function quoteFromTables($from_table) {
-               if ($from_table == '') return '';
-               if ($this->runningNative()) return $from_table;
-
-               $from_table = $this->SQLparser->parseFromTables($from_table);
-               $from_table = $this->_quoteFromTables($from_table);
-               return $this->SQLparser->compileFromTables($from_table);
-       }
-
-       /**
-        * Quotes table names in a SQL FROM clause acccording to DB rules
-        *
-        * @param array $from_table The parsed FROM clause to quote
-        * @return array
-        * @see quoteFromTables()
-        */
-       protected function _quoteFromTables(array $from_table) {
-               foreach ($from_table as $k => $v) {
-                       $from_table[$k]['table'] = $this->quoteName($from_table[$k]['table']);
-                       if ($from_table[$k]['as'] != '') {
-                               $from_table[$k]['as'] = $this->quoteName($from_table[$k]['as']);
-                       }
-                       if (is_array($v['JOIN'])) {
-                               foreach ($v['JOIN'] as $joinCnt => $join) {
-                                       $from_table[$k]['JOIN'][$joinCnt]['withTable'] = $this->quoteName($join['withTable']);
-                                       $from_table[$k]['JOIN'][$joinCnt]['as'] = ($join['as']) ? $this->quoteName($join['as']) : '';
-                                       foreach ($from_table[$k]['JOIN'][$joinCnt]['ON'] as &$condition) {
-                                               $condition['left']['table'] = ($condition['left']['table']) ? $this->quoteName($condition['left']['table']) : '';
-                                               $condition['left']['field'] = $this->quoteName($condition['left']['field']);
-                                               $condition['right']['table'] = ($condition['right']['table']) ? $this->quoteName($condition['right']['table']) : '';
-                                               $condition['right']['field'] = $this->quoteName($condition['right']['field']);
-                                       }
-                               }
-                       }
-               }
-
-               return $from_table;
-       }
-
-       /**
-        * 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 be parsed by parseWhereClause
-        * @return      string          Usable where clause with quoted field/table names
-        */
-       public function quoteWhereClause($where_clause) {
-               if ($where_clause === '' || $this->runningNative()) return $where_clause;
-
-               $where_clause = $this->SQLparser->parseWhereClause($where_clause);
-               if (is_array($where_clause)) {
-                       $where_clause = $this->_quoteWhereClause($where_clause);
-                       $where_clause = $this->SQLparser->compileWhereClause($where_clause);
-               } else {
-                       die('Could not parse where clause in ' . __FILE__ . ' : ' . __LINE__);
-               }
-
-               return $where_clause;
-       }
-
-       /**
-        * Quotes field names in a SQL WHERE clause acccording to DB rules
-        *
-        * @param       array           $where_clause The parsed WHERE clause to quote
-        * @return      array
-        * @see quoteWhereClause()
-        */
-       protected function _quoteWhereClause(array $where_clause) {
-               foreach ($where_clause as $k => $v) {
-                               // Look for sublevel:
-                       if (is_array($where_clause[$k]['sub'])) {
-                               $where_clause[$k]['sub'] = $this->_quoteWhereClause($where_clause[$k]['sub']);
-                       } else {
-                               if ($where_clause[$k]['table'] != '') {
-                                       $where_clause[$k]['table'] = $this->quoteName($where_clause[$k]['table']);
-                               }
-                               if (!is_numeric($where_clause[$k]['field'])) {
-                                       $where_clause[$k]['field'] = $this->quoteName($where_clause[$k]['field']);
-                               }
-                               if (isset($where_clause[$k]['calc_table'])) {
-                                       if ($where_clause[$k]['calc_table'] != '') {
-                                               $where_clause[$k]['calc_table'] = $this->quoteName($where_clause[$k]['calc_table']);
-                                       }
-                                       if ($where_clause[$k]['calc_field'] != '') {
-                                               $where_clause[$k]['calc_field'] = $this->quoteName($where_clause[$k]['calc_field']);
-                                       }
-                               }
-                       }
-                       if ($where_clause[$k]['comparator']) {
-                               if (isset($v['value']['operator'])) {
-                                       foreach ($where_clause[$k]['value']['args'] as $argK => $fieldDef) {
-                                               $where_clause[$k]['value']['args'][$argK]['table'] = $this->quoteName($fieldDef['table']);
-                                               $where_clause[$k]['value']['args'][$argK]['field'] = $this->quoteName($fieldDef['field']);
-                                       }
-                               } else {
-                                               // Detecting value type; list or plain:
-                                       if (t3lib_div::inList('NOTIN,IN', strtoupper(str_replace(array(' ',"\n", "\r", "\t"), '', $where_clause[$k]['comparator'])))) {
-                                               if (isset($v['subquery'])) {
-                                                       $where_clause[$k]['subquery'] = $this->quoteSELECTsubquery($v['subquery']);
-                                               }
-                                       } else {
-                                               if ((!isset($where_clause[$k]['value'][1]) || $where_clause[$k]['value'][1] == '') && is_string($where_clause[$k]['value'][0]) && strstr($where_clause[$k]['value'][0], '.')) {
-                                                       $where_clause[$k]['value'][0] = $this->quoteFieldNames($where_clause[$k]['value'][0]);
-                                               }
-                                       }
-                               }
-                       }
-               }
-
-               return $where_clause;
-       }
-
-       /**
-        * Quotes field names in a SQL GROUP BY clause acccording to DB rules
-        *
-        * @param       array           $groupBy The parsed GROUP BY clause to quote
-        * @return      array
-        * @see quoteGroupBy()
-        */
-       protected function quoteGroupBy($groupBy) {
-               if ($groupBy === '') return '';
-               if ($this->runningNative()) return $groupBy;
-
-               $groupBy = $this->SQLparser->parseFieldList($groupBy);
-               foreach ($groupBy as $k => $v) {
-                       $groupBy[$k]['field'] = $this->quoteName($groupBy[$k]['field']);
-                       if ($groupBy[$k]['table'] != '') {
-                               $groupBy[$k]['table'] = $this->quoteName($groupBy[$k]['table']);
-                       }
-               }
-               return $this->SQLparser->compileFieldList($groupBy);
-       }
-
-       /**
-        * Quotes the field (and table) names within an order by clause with the quote
-        * character suitable for the DB being used
-        *
-        * @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 '';
-               if ($this->runningNative()) return $orderBy;
-
-               $orderBy = $this->SQLparser->parseFieldList($orderBy);
-               foreach ($orderBy as $k => $v) {
-                       $orderBy[$k]['field'] = $this->quoteName($orderBy[$k]['field']);
-                       if ($orderBy[$k]['table'] != '') {
-                               $orderBy[$k]['table'] = $this->quoteName($orderBy[$k]['table']);
-                       }
-               }
-               return $this->SQLparser->compileFieldList($orderBy);
-       }
-
-
-
-       /**************************************
-       *
-       * Various helper functions
-       *
-       **************************************/
-
-       /**
-        * Escaping and quoting values for SQL statements.
-        *
-        * @param       string          Input string
-        * @param       string          Table name for which to quote string. Just enter the table that the field-value is selected from (and any DBAL will look up which handler to use and then how to quote the string!).
-        * @return      string          Output string; Wrapped in single quotes and quotes in the string (" / ') and \ will be backslashed (or otherwise based on DBAL handler)
-        * @see quoteStr()
-        */
-       public function fullQuoteStr($str, $table) {
-               return '\'' . $this->quoteStr($str, $table) . '\'';
-       }
-
-       /**
-        * Substitution for PHP function "addslashes()"
-        * NOTICE: You must wrap the output of this function in SINGLE QUOTES to be DBAL compatible. Unless you have to apply the single quotes yourself you should rather use ->fullQuoteStr()!
-        *
-        * @param       string          Input string
-        * @param       string          Table name for which to quote string. Just enter the table that the field-value is selected from (and any DBAL will look up which handler to use and then how to quote the string!).
-        * @return      string          Output string; Quotes (" / ') and \ will be backslashed (or otherwise based on DBAL handler)
-        * @see quoteStr()
-        */
-       public function quoteStr($str, $table) {
-               $this->lastHandlerKey = $this->handler_getFromTableList($table);
-               switch ((string)$this->handlerCfg[$this->lastHandlerKey]['type']) {
-                       case 'native':
-                               $str = mysql_real_escape_string($str, $this->handlerInstance[$this->lastHandlerKey]['link']);
-                               break;
-                       case 'adodb':
-                               $str = substr($this->handlerInstance[$this->lastHandlerKey]->qstr($str), 1, -1);
-                               break;
-                       case 'userdefined':
-                               $str = $this->handlerInstance[$this->lastHandlerKey]->quoteStr($str);
-                               break;
-                       default:
-                               die('No handler found!!!');
-                               break;
-               }
-
-               return $str;
-       }
-
-       /**
-        * Quotes an object name (table name, field, ...)
-        *
-        * @param       string          Object's name
-        * @param       string          Handler key
-        * @param       boolean         If method NameQuote() is not used, whether to use backticks instead of driver-specific quotes
-        * @return      string          Properly-quoted object's name
-        */
-       public function quoteName($name, $handlerKey = NULL, $useBackticks = FALSE) {
-               $handlerKey = $handlerKey ? $handlerKey : $this->lastHandlerKey;
-               $useNameQuote = isset($this->handlerCfg[$handlerKey]['config']['useNameQuote']) ? $this->handlerCfg[$handlerKey]['config']['useNameQuote'] : FALSE;
-               if ($useNameQuote) {
-                       return $this->handlerInstance[$handlerKey]->DataDictionary->NameQuote($name);
-               } else {
-                       $quote = $useBackticks ? '`' : $this->handlerInstance[$handlerKey]->nameQuote;
-                       return $quote . $name . $quote;
-               }
-       }
-
-       /**
-        * Return MetaType for native field type (ADOdb only!)
-        *
-        * @param       string          native type as reported by admin_get_fields()
-        * @param       string          Table name for which query type string. Important for detection of DBMS handler of the query!
-        * @return      string          Meta type (currenly ADOdb syntax only, http://phplens.com/lens/adodb/docs-adodb.htm#metatype)
-        */
-       public function MetaType($type, $table, $max_length = -1) {
-               $this->lastHandlerKey = $this->handler_getFromTableList($table);
-               $str = '';
-               switch ((string)$this->handlerCfg[$this->lastHandlerKey]['type']) {
-                       case 'native':
-                               $str = $type;
-                               break;
-                       case 'adodb':
-                               if (in_array($table, $this->cache_fieldType)) {
-                                       $rs = $this->handlerInstance[$this->lastHandlerKey]->SelectLimit('SELECT * FROM ' . $this->quoteFromTables($table), 1);
-                                       $str = $rs->MetaType($type, $max_length);
-                               }
-                               break;
-                       case 'userdefined':
-                               $str = $this->handlerInstance[$this->lastHandlerKey]->MetaType($str,$table,$max_length);
-                               break;
-                       default:
-                               die('No handler found!!!');
-                               break;
-               }
-
-               return $str;
-       }
-
-
-       /**
-        * Return MetaType for native MySQL field type
-        *
-        * @param       string          native type as reported as in mysqldump files
-        * @return      string          Meta type (currenly ADOdb syntax only, http://phplens.com/lens/adodb/docs-adodb.htm#metatype)
-        */
-       public function MySQLMetaType($t) {
-
-               switch (strtoupper($t)) {
-                       case 'STRING':
-                       case 'CHAR':
-                       case 'VARCHAR':
-                       case 'TINYBLOB':
-                       case 'TINYTEXT':
-                       case 'ENUM':
-                       case 'SET': return 'C';
-
-                       case 'TEXT':
-                       case 'LONGTEXT':
-                       case 'MEDIUMTEXT': return 'XL';
-
-                       case 'IMAGE':
-                       case 'LONGBLOB':
-                       case 'BLOB':
-                       case 'MEDIUMBLOB': return 'B';
-
-                       case 'YEAR':
-                       case 'DATE': return 'D';
-
-                       case 'TIME':
-                       case 'DATETIME':
-                       case 'TIMESTAMP': return 'T';
-
-                       case 'FLOAT':
-                       case 'DOUBLE': return 'F';
-
-                       case 'INT':
-                       case 'INTEGER':
-                       case 'TINYINT':
-                       case 'SMALLINT':
-                       case 'MEDIUMINT':
-                       case 'BIGINT': return 'I8'; // we always return I8 to be on the safe side. Under some circumstances the fields are to small otherwise...
-
-                       default: return 'N';
-               }
-       }
-
-       /**
-        * Return actual MySQL type for meta field type
-        *
-        * @param       string          Meta type (currenly ADOdb syntax only, http://phplens.com/lens/adodb/docs-adodb.htm#metatype)
-        * @return      string          native type as reported as in mysqldump files, uppercase
-        */
-       public function MySQLActualType($meta) {
-               switch (strtoupper($meta)) {
-                       case 'C': return 'VARCHAR';
-                       case 'XL':
-                       case 'X': return 'LONGTEXT';
-
-                       case 'C2': return 'VARCHAR';
-                       case 'X2': return 'LONGTEXT';
-
-                       case 'B': return 'LONGBLOB';
-
-                       case 'D': return 'DATE';
-                       case 'T': return 'DATETIME';
-                       case 'L': return 'TINYINT';
-
-                       case 'I':
-                       case 'I1':
-                       case 'I2':
-                       case 'I4':
-                       case 'I8': return 'BIGINT'; // we only have I8 in DBAL, see MySQLMetaType()
-
-                       case 'F': return 'DOUBLE';
-                       case 'N': return 'NUMERIC';
-
-                       default: return $meta;
-               }
-       }
-
-
-
-
-       /**************************************
-       *
-       * SQL wrapper functions (Overriding parent methods)
-       * (For use in your applications)
-       *
-       **************************************/
-
-       /**
-        * Returns the error status on the most recent sql() execution (based on $this->lastHandlerKey)
-        *
-        * @return      string          Handler error strings
-        */
-       public function sql_error() {
-               switch ($this->handlerCfg[$this->lastHandlerKey]['type']) {
-                       case 'native':
-                               $output = mysql_error($this->handlerInstance[$this->lastHandlerKey]['link']);
-                               break;
-                       case 'adodb':
-                               $output = $this->handlerInstance[$this->lastHandlerKey]->ErrorMsg();
-                               break;
-                       case 'userdefined':
-                               $output = $this->handlerInstance[$this->lastHandlerKey]->sql_error();
-                               break;
-               }
-               return $output;
-       }
-
-       /**
-        * Returns the error number on the most recent sql() execution (based on $this->lastHandlerKey)
-        *
-        * @return      int             Handler error number
-        */
-       public function sql_errno() {
-               switch ($this->handlerCfg[$this->lastHandlerKey]['type']) {
-                       case 'native':
-                               $output = mysql_errno($this->handlerInstance[$this->lastHandlerKey]['link']);
-                               break;
-                       case 'adodb':
-                               $output = $this->handlerInstance[$this->lastHandlerKey]->ErrorNo();
-                               break;
-                       case 'userdefined':
-                               $output = $this->handlerInstance[$this->lastHandlerKey]->sql_errno();
-                               break;
-               }
-               return $output;
-       }
-
-       /**
-        * Returns the number of selected rows.
-        *
-        * @param       pointer         Result pointer / DBAL object
-        * @return      integer         Number of resulting rows.
-        */
-       public function sql_num_rows(&$res) {
-               if ($res === FALSE) return 0;
-
-               $handlerType = is_object($res) ? $res->TYPO3_DBAL_handlerType : 'native';
-               switch ($handlerType) {
-                       case 'native':
-                               $output = mysql_num_rows($res);
-                               break;
-                       case 'adodb':
-                               $output = method_exists($res, 'RecordCount') ? $res->RecordCount() : 0;
-                               break;
-                       case 'userdefined':
-                               $output = $res->sql_num_rows();
-                               break;
-               }
-               return $output;
-       }
-
-       /**
-        * Returns an associative array that corresponds to the fetched row, or FALSE if there are no more rows.
-        *
-        * @param       pointer         MySQL result pointer (of SELECT query) / DBAL object
-        * @return      array           Associative array of result row.
-        */
-       public function sql_fetch_assoc(&$res) {
-               $output = array();
-
-               $handlerType = is_object($res) ? $res->TYPO3_DBAL_handlerType : (is_resource($res) ? 'native' : FALSE);
-               switch ($handlerType) {
-                       case 'native':
-                               $output = mysql_fetch_assoc($res);
-                               $tableList = $this->resourceIdToTableNameMap[(string)$res];     // Reading list of tables from SELECT query:
-                               break;
-                       case 'adodb':
-                                       // Check if method exists for the current $res object.
-                                       // If a table exists in TCA but not in the db, a error
-                                       // occured because $res is not a valid object.
-                               if (method_exists($res, 'FetchRow')) {
-                                       $output = $res->FetchRow();
-                                       $tableList = $res->TYPO3_DBAL_tableList;        // Reading list of tables from SELECT query:
-
-                                               // Removing all numeric/integer keys.
-                                               // A workaround because in ADOdb we would need to know what we want before executing the query...
-                                               // MSSQL does not support ADODB_FETCH_BOTH and always returns an assoc. array instead. So
-                                               // we don't need to remove anything.
-                                       if (is_array($output)) {
-                                               if ($this->runningADOdbDriver('mssql')) {
-                                                               // MSSQL does not know such thing as an empty string. So it returns one space instead, which we must fix.
-                                                       foreach ($output as $key => $value) {
-                                                               if ($value === ' ') {
-                                                                       $output[$key] = '';
-                                                               }
-                                                       }
-                                               } else {
-                                                       foreach ($output as $key => $value) {
-                                                               if (is_integer($key)) {
-                                                                       unset($output[$key]);
-                                                               }
-                                                       }
-                                               }
-                                       }
-                               }
-                               break;
-                       case 'userdefined':
-                               $output = $res->sql_fetch_assoc();
-                               $tableList = $res->TYPO3_DBAL_tableList;        // Reading list of tables from SELECT query:
-                               break;
-               }
-
-                       // Table/Fieldname mapping:
-               if (is_array($output)) {
-                       if ($tables = $this->map_needMapping($tableList,TRUE)) {
-                               $output = $this->map_assocArray($output,$tables,1);
-                       }
-               }
-
-                       // Return result:
-               return $output;
-       }
-
-       /**
-        * Returns an array that corresponds to the fetched row, or FALSE if there are no more rows.
-        * The array contains the values in numerical indices.
-        *
-        * @param       pointer         MySQL result pointer (of SELECT query) / DBAL object
-        * @return      array           Array with result rows.
-        */
-       public function sql_fetch_row(&$res) {
-               $handlerType = is_object($res) ? $res->TYPO3_DBAL_handlerType : 'native';
-               switch ($handlerType) {
-                       case 'native':
-                               $output = mysql_fetch_row($res);
-                               break;
-                       case 'adodb':
-                                       // Check if method exists for the current $res object.
-                                       // If a table exists in TCA but not in the db, a error
-                                       // occured because $res is not a valid object.
-                               if (method_exists($res, 'FetchRow')) {
-                                       $output = $res->FetchRow();
-
-                                               // Removing all assoc. keys.
-                                               // A workaround because in ADOdb we would need to know what we want before executing the query...
-                                               // MSSQL does not support ADODB_FETCH_BOTH and always returns an assoc. array instead. So
-                                               // we need to convert resultset.
-                                       if (is_array($output)) {
-                                               $keyIndex = 0;
-                                               foreach ($output as $key => $value) {
-                                                       unset($output[$key]);
-                                                       if (is_integer($key) || $this->runningADOdbDriver('mssql')) {
-                                                               $output[$keyIndex] = $value;
-                                                               if ($value === ' ') {
-                                                                               // MSSQL does not know such thing as an empty string. So it returns one space instead, which we must fix.
-                                                                       $output[$keyIndex] = '';
-                                                               }
-                                                               $keyIndex++;
-                                                       }
-                                               }
-                                       }
-                               }
-                               break;
-                       case 'userdefined':
-                               $output = $res->sql_fetch_row();
-                               break;
-               }
-               return $output;
-       }
-
-       /**
-        * Free result memory / unset result object
-        *
-        * @param       pointer         MySQL result pointer to free / DBAL object
-        * @return      boolean         Returns TRUE on success or FALSE on failure.
-        */
-       public function sql_free_result(&$res) {
-               if ($res === FALSE) return FALSE;
-
-               $handlerType = is_object($res) ? $res->TYPO3_DBAL_handlerType : 'native';
-               switch ($handlerType) {
-                       case 'native':
-                               $output = mysql_free_result($res);
-                               break;
-                       case 'adodb':
-                               if (method_exists($res, 'Close')) {
-                                       $res->Close();
-                                       unset($res);
-                                       $output = TRUE;
-                               } else {
-                                       $output = FALSE;
-                               }
-                               break;
-                       case 'userdefined':
-                               unset($res);
-                               break;
-               }
-               return $output;
-       }
-
-       /**
-        * Get the ID generated from the previous INSERT operation
-        *
-        * @return      integer         The uid of the last inserted record.
-        */
-       public function sql_insert_id() {
-               switch ($this->handlerCfg[$this->lastHandlerKey]['type']) {
-                       case 'native':
-                               $output = mysql_insert_id($this->handlerInstance[$this->lastHandlerKey]['link']);
-                               break;
-                       case 'adodb':
-                               $output = $this->handlerInstance[$this->lastHandlerKey]->last_insert_id;
-                               break;
-                       case 'userdefined':
-                               $output = $this->handlerInstance[$this->lastHandlerKey]->sql_insert_id();
-                               break;
-               }
-               return $output;
-       }
-
-       /**
-        * Returns the number of rows affected by the last INSERT, UPDATE or DELETE query
-        *
-        * @return      integer         Number of rows affected by last query
-        */
-       public function sql_affected_rows() {
-               switch ($this->handlerCfg[$this->lastHandlerKey]['type']) {
-                       case 'native':
-                               $output = mysql_affected_rows();
-                               break;
-                       case 'adodb':
-                               $output = $this->handlerInstance[$this->lastHandlerKey]->Affected_Rows();
-                               break;
-                       case 'userdefined':
-                               $output = $this->handlerInstance[$this->lastHandlerKey]->sql_affected_rows();
-                               break;
-               }
-               return $output;
-       }
-
-       /**
-        * Move internal result pointer
-        *
-        * @param       pointer         MySQL result pointer (of SELECT query) / DBAL object
-        * @param       integer         Seek result number.
-        * @return      boolean         Returns TRUE on success or FALSE on failure.
-        */
-       public function sql_data_seek(&$res, $seek) {
-               $handlerType = is_object($res) ? $res->TYPO3_DBAL_handlerType : 'native';
-               switch ($handlerType) {
-                       case 'native':
-                               $output = mysql_data_seek($res,$seek);
-                               break;
-                       case 'adodb':
-                               $output = $res->Move($seek);
-                               break;
-                       case 'userdefined':
-                               $output = $res->sql_data_seek($seek);
-                               break;
-               }
-               return $output;
-       }
-
-       /**
-        * Get the type of the specified field in a result
-        *
-        * If the first parameter is a string, it is used as table name for the lookup.
-        *
-        * @param       pointer         MySQL result pointer (of SELECT query) / DBAL object / table name
-        * @param       integer         Field index. In case of ADOdb a string (field name!) FIXME
-        * @return      string          Returns the type of the specified field index
-        */
-       public function sql_field_metatype($table, $field) {
-                       // If $table and/or $field are mapped, use the original names instead
-               foreach ($this->mapping as $tableName => $tableMapInfo) {
-                       if (isset($tableMapInfo['mapTableName']) && $tableMapInfo['mapTableName'] === $table) {
-                                       // Table name is mapped => use original name
-                               $table = $tableName;
-                       }
-
-                       if (isset($tableMapInfo['mapFieldNames'])) {
-                               foreach ($tableMapInfo['mapFieldNames'] as $fieldName => $fieldMapInfo) {
-                                       if ($fieldMapInfo === $field) {
-                                                       // Field name is mapped => use original name
-                                               $field = $fieldName;
-                                       }
-                               }
-                       }
-               }
-
-               return $this->cache_fieldType[$table][$field]['metaType'];
-       }
-
-       /**
-        * Get the type of the specified field in a result
-        *
-        * If the first parameter is a string, it is used as table name for the lookup.
-        *
-        * @param       pointer         MySQL result pointer (of SELECT query) / DBAL object / table name
-        * @param       integer         Field index. In case of ADOdb a string (field name!) FIXME
-        * @return      string          Returns the type of the specified field index
-        */
-       public function sql_field_type(&$res,$pointer) {
-               if ($res === null) {
-                       debug(array('no res in sql_field_type!'));
-                       return 'text';
-               }
-               elseif (is_string($res)){
-                       if ($res === 'tx_dbal_debuglog') return 'text';
-                       $handlerType = 'adodb';
-               }
-               else {
-                       $handlerType = is_object($res) ? $res->TYPO3_DBAL_handlerType :  'native';
-               }
-
-               switch ($handlerType) {
-                       case 'native':
-                               $output = mysql_field_type($res,$pointer);
-                               break;
-                       case 'adodb':
-                               if (is_string($pointer)){
-                                       $output = $this->cache_fieldType[$res][$pointer]['type'];
-                               }
-
-                               break;
-                       case 'userdefined':
-                               $output = $res->sql_field_type($pointer);
-                               break;
-               }
-
-               return $output;
-       }
-
-
-
-
-
-
-
-
-       /**********
-       *
-       * Legacy functions, bound to _DEFAULT handler. (Overriding parent methods)
-       * Deprecated.
-       *
-       **********/
-
-       /**
-        * Executes query (on DEFAULT handler!)
-        * DEPRECATED - use exec_* functions from this class instead!
-        *
-        * @param       string          Database name
-        * @param       string          Query to execute
-        * @return      pointer         Result pointer
-        * @deprecated since TYPO3 4.1
-        */
-       public function sql($db,$query) {
-               return $this->sql_query($query);
-       }
-
-       /**
-        * Executes query (on DEFAULT handler!)
-        * DEPRECATED - use exec_* functions from this class instead!
-        *
-        * If you don't, anything that uses not the _DEFAULT handler will break!
-        *
-        * @param       string          Query to execute
-        * @return      pointer         Result pointer / DBAL object
-        * @deprecated since TYPO3 4.1
-        */
-       public function sql_query($query) {
-               switch ($this->handlerCfg['_DEFAULT']['type']) {
-                       case 'native':
-                               $sqlResult = mysql_query($query, $this->handlerInstance['_DEFAULT']['link']);
-                               break;
-                       case 'adodb':
-                               $sqlResult = $this->handlerInstance['_DEFAULT']->Execute($query);
-                               $sqlResult->TYPO3_DBAL_handlerType = 'adodb';
-                               break;
-                       case 'userdefined':
-                               $sqlResult = $this->handlerInstance['_DEFAULT']->sql_query($query);
-                               $sqlResult->TYPO3_DBAL_handlerType = 'userdefined';
-                               break;
-               }
-
-               if ($this->printErrors && $this->sql_error()) {
-                       debug(array($this->lastQuery, $this->sql_error()));
-               }
-
-               return $sqlResult;
-       }
-
-       /**
-        * Opening the _DEFAULT connection handler to the database.
-        * This is typically done by the scripts "init.php" in the backend or "index_ts.php" in the frontend (tslib_fe->connectToMySQL())
-        * You wouldn't need to use this at any time - let TYPO3 core handle this.
-        *
-        * @param       string          Database host IP/domain
-        * @param       string          Username to connect with.
-        * @param       string          Password to connect with.
-        * @return      mixed           Returns handler connection value
-        * @see handler_init()
-        */
-       public function sql_pconnect($TYPO3_db_host, $TYPO3_db_username, $TYPO3_db_password) {
-                       // Overriding the _DEFAULT handler configuration of username, password, localhost and database name:
-               $this->handlerCfg['_DEFAULT']['config']['username'] = $TYPO3_db_username;
-               $this->handlerCfg['_DEFAULT']['config']['password'] = $TYPO3_db_password;
-               $this->handlerCfg['_DEFAULT']['config']['host'] = $TYPO3_db_host;
-               $this->handlerCfg['_DEFAULT']['config']['database'] = TYPO3_db;
-
-                       // Initializing and output value:
-               $sqlResult = $this->handler_init('_DEFAULT');
-               return $sqlResult;
-       }
-
-       /**
-        * Select database for _DEFAULT handler.
-        *
-        * @param       string          Database to connect to.
-        * @return      boolean         Always returns TRUE; function is obsolete, database selection is made in handler_init() function!
-        */
-       public function sql_select_db($TYPO3_db) {
-               return TRUE;
-       }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-       /**************************************
-       *
-       * SQL admin functions
-       * (For use in the Install Tool and Extension Manager)
-       *
-       **************************************/
-
-       /**
-        * Listing databases from current MySQL connection. NOTICE: It WILL try to select those databases and thus break selection of current database.
-        * Use in Install Tool only!
-        * Usage count/core: 1
-        *
-        * @return      array           Each entry represents a database name
-        */
-       public function admin_get_dbs() {
-               $dbArr = array();
-               switch ($this->handlerCfg['_DEFAULT']['type']) {
-                       case 'native':
-                               $db_list = mysql_list_dbs($this->link);
-                               while ($row = mysql_fetch_object($db_list)) {
-                                       if ($this->sql_select_db($row->Database)) {
-                                               $dbArr[] = $row->Database;
-                                       }
-                               }
-                               break;
-                       case 'adodb':
-                                       // check needed for install tool - otherwise it will just die because the call to
-                                       // MetaDatabases is done on a stdClass instance
-                               if (method_exists($this->handlerInstance['_DEFAULT'],'MetaDatabases')) {
-                                       $sqlDBs = $this->handlerInstance['_DEFAULT']->MetaDatabases();
-                                       if (is_array($sqlDBs)) {
-                                               foreach ($sqlDBs as $k => $theDB) {
-                                                       $dbArr[] = $theDB;
-                                               }
-                                       }
-                               }
-                               break;
-                       case 'userdefined':
-                               $dbArr = $this->handlerInstance['_DEFAULT']->admin_get_tables();
-                               break;
-               }
-
-               return $dbArr;
-       }
-
-       /**
-        * Returns the list of tables from the system (quering the DBMSs)
-        * It looks up all tables from the DBMS of the _DEFAULT handler and then add all tables *configured* to be managed by other handlers
-        *
-        * When fetching the tables, it skips tables whose names begin with BIN$, as this is taken as a table coming from the "Recycle Bin" on Oracle.
-        *
-        * @return      array           Tables in an array (tablename is in both key and value)
-        * @todo        Should the check for Oracle Recycle Bin stuff be moved elsewhere?
-        * @todo        Should return table details in value! see t3lib_db::admin_get_tables()
-        */
-       public function admin_get_tables() {
-               $whichTables = array();
-
-                       // Getting real list of tables:
-               switch ($this->handlerCfg['_DEFAULT']['type']) {
-                       case 'native':
-                               $tables_result = mysql_query('SHOW TABLE STATUS FROM `' . TYPO3_db . '`', $this->handlerInstance['_DEFAULT']['link']);
-                               if (!$this->sql_error()) {
-                                       while ($theTable = $this->sql_fetch_assoc($tables_result)) {
-                                               $whichTables[current($theTable)] = current($theTable);
-                                       }
-                               }
-                               break;
-                       case 'adodb':
-                               $sqlTables = $this->handlerInstance['_DEFAULT']->MetaTables('TABLES');
-                               while (list($k, $theTable) = each($sqlTables)) {
-                                       if (preg_match('/BIN\$/', $theTable)) continue; // skip tables from the Oracle 10 Recycle Bin
-                                       $whichTables[$theTable] = $theTable;
-                               }
-                               break;
-                       case 'userdefined':
-                               $whichTables = $this->handlerInstance['_DEFAULT']->admin_get_tables();
-                               break;
-               }
-
-                       // Check mapping:
-               if (is_array($this->mapping) && count($this->mapping)) {
-
-                               // Mapping table names in reverse, first getting list of real table names:
-                       $tMap = array();
-                       foreach ($this->mapping as $tN => $tMapInfo) {
-                               if (isset($tMapInfo['mapTableName']))   $tMap[$tMapInfo['mapTableName']]=$tN;
-                       }
-
-                               // Do mapping:
-                       $newList=array();
-                       foreach ($whichTables as $tN) {
-                               if (isset($tMap[$tN]))  $tN = $tMap[$tN];
-                               $newList[$tN] = $tN;
-                       }
-
-                       $whichTables = $newList;
-               }
-
-                       // Adding tables configured to reside in other DBMS (handler by other handlers than the default):
-               if (is_array($this->table2handlerKeys)) {
-                       foreach ($this->table2handlerKeys as $key => $handlerKey) {
-                               $whichTables[$key] = $key;
-                       }
-               }
-
-               return $whichTables;
-       }
-
-       /**
-        * Returns information about each field in the $table (quering the DBMS)
-        * In a DBAL this should look up the right handler for the table and return compatible information
-        * This function is important not only for the Install Tool but probably for DBALs as well since they might need to look up table specific information in order to construct correct queries. In such cases this information should probably be cached for quick delivery
-        *
-        * @param       string          Table name
-        * @return      array           Field information in an associative array with fieldname => field row
-        */
-       public function admin_get_fields($tableName) {
-               $output = array();
-
-                       // Do field mapping if needed:
-               $ORIG_tableName = $tableName;
-               if ($tableArray = $this->map_needMapping($tableName)) {
-
-                               // Table name:
-                       if ($this->mapping[$tableName]['mapTableName']) {
-                               $tableName = $this->mapping[$tableName]['mapTableName'];
-                       }
-               }
-
-                       // Find columns
-               $this->lastHandlerKey = $this->handler_getFromTableList($ORIG_tableName);
-               switch ((string)$this->handlerCfg[$this->lastHandlerKey]['type']) {
-                       case 'native':
-                               $columns_res = mysql_query('SHOW columns FROM '.$tableName, $this->handlerInstance[$this->lastHandlerKey]['link']);
-                               while($fieldRow = mysql_fetch_assoc($columns_res)) {
-                                       $output[$fieldRow['Field']] = $fieldRow;
-                               }
-                               break;
-                       case 'adodb':
-                               $fieldRows = $this->handlerInstance[$this->lastHandlerKey]->MetaColumns($tableName, FALSE);
-                               if (is_array($fieldRows)) {
-                                       foreach ($fieldRows as $k => $fieldRow) {
-                                               settype($fieldRow, 'array');
-                                               $fieldRow['Field'] = $fieldRow['name'];
-                                               $ntype = $this->MySQLActualType($this->MetaType($fieldRow['type'],$tableName));
-                                               $ntype .= (($fieldRow['max_length'] != -1) ? (($ntype == 'INT') ? '(11)' :'('.$fieldRow['max_length'].')') : '');
-                                               $fieldRow['Type'] = strtolower($ntype);
-                                               $fieldRow['Null'] = '';
-                                               $fieldRow['Key'] = '';
-                                               $fieldRow['Default'] = $fieldRow['default_value'];
-                                               $fieldRow['Extra'] = '';
-                                               $output[$fieldRow['name']] = $fieldRow;
-                                       }
-                               }
-                               break;
-                       case 'userdefined':
-                               $output = $this->handlerInstance[$this->lastHandlerKey]->admin_get_fields($tableName);
-                               break;
-               }
-
-                       // mapping should be done:
-               if (is_array($tableArray) && is_array($this->mapping[$ORIG_tableName]['mapFieldNames'])) {
-                       $revFields = array_flip($this->mapping[$ORIG_tableName]['mapFieldNames']);
-
-                       $newOutput = array();
-                       foreach ($output as $fN => $fInfo) {
-                               if (isset($revFields[$fN])) {
-                                       $fN = $revFields[$fN];
-                                       $fInfo['Field'] = $fN;
-                               }
-                               $newOutput[$fN] = $fInfo;
-                       }
-                       $output = $newOutput;
-               }
-
-               return $output;
-       }
-
-       /**
-        * Returns information about each index key in the $table (quering the DBMS)
-        * In a DBAL this should look up the right handler for the table and return compatible information
-        *
-        * @param       string          Table name
-        * @return      array           Key information in a numeric array
-        */
-       public function admin_get_keys($tableName) {
-               $output = array();
-
-                       // Do field mapping if needed:
-               $ORIG_tableName = $tableName;
-               if ($tableArray = $this->map_needMapping($tableName)) {
-
-                               // Table name:
-                       if ($this->mapping[$tableName]['mapTableName']) {
-                               $tableName = $this->mapping[$tableName]['mapTableName'];
-                       }
-               }
-
-                       // Find columns
-               $this->lastHandlerKey = $this->handler_getFromTableList($ORIG_tableName);
-               switch ((string)$this->handlerCfg[$this->lastHandlerKey]['type']) {
-                       case 'native':
-                               $keyRes = mysql_query('SHOW keys FROM '.$tableName, $this->handlerInstance[$this->lastHandlerKey]['link']);
-                               while($keyRow = mysql_fetch_assoc($keyRes)) {
-                                       $output[] = $keyRow;
-                               }
-                               break;
-                       case 'adodb':
-                               $keyRows = $this->handlerInstance[$this->lastHandlerKey]->MetaIndexes($tableName);
-                               if ($keyRows !== FALSE) {
-                                       while (list($k, $theKey) = each($keyRows)) {
-                                               $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'] = '';
-                                               $theKey['Sub_part'] = '';
-                                               $theKey['Packed'] = '';
-                                               $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)) {
-                                                       $theKey['Seq_in_index'] = $c+1;
-                                                       $theKey['Column_name'] = $theCol;
-                                                       $output[] = $theKey;
-                                               }
-                                       }
-                               }
-                               $priKeyRow = $this->handlerInstance[$this->lastHandlerKey]->MetaPrimaryKeys($tableName);
-                               $theKey = array();
-                               $theKey['Table'] = $tableName;
-                               $theKey['Non_unique'] = 0;
-                               $theKey['Key_name'] = 'PRIMARY';
-
-                                       // the following are probably not needed anyway...
-                               $theKey['Collation'] = '';
-                               $theKey['Cardinality'] = '';
-                               $theKey['Sub_part'] = '';
-                               $theKey['Packed'] = '';
-                               $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)) {
-                                               $theKey['Seq_in_index'] = $c+1;
-                                               $theKey['Column_name'] = $theCol;
-                                               $output[] = $theKey;
-                                       }
-                               }
-                               break;
-                       case 'userdefined':
-                               $output = $this->handlerInstance[$this->lastHandlerKey]->admin_get_keys($tableName);
-                               break;
-               }
-
-                       // mapping should be done:
-               if (is_array($tableArray) && is_array($this->mapping[$ORIG_tableName]['mapFieldNames'])) {
-                       $revFields = array_flip($this->mapping[$ORIG_tableName]['mapFieldNames']);
-
-                       $newOutput = array();
-                       foreach ($output as $kN => $kInfo) {
-                                       // Table:
-                               $kInfo['Table'] = $ORIG_tableName;
-
-                                       // Column
-                               if (isset($revFields[$kInfo['Column_name']])) {
-                                       $kInfo['Column_name'] = $revFields[$kInfo['Column_name']];
-                               }
-
-                                       // Write it back:
-                               $newOutput[$kN] = $kInfo;
-                       }
-                       $output = $newOutput;
-               }
-
-               return $output;
-       }
-
-       /**
-        * mysql() wrapper function, used by the Install Tool.
-        *
-        * @return      array
-        */
-       public function admin_get_charsets() {
-               return array();
-       }
-
-       /**
-        * mysql() wrapper function, used by the Install Tool and EM for all queries regarding management of the database!
-        *
-        * @param       string          Query to execute
-        * @return      pointer         Result pointer
-        */
-       public function admin_query($query) {
-               $parsedQuery = $this->SQLparser->parseSQL($query);
-               $ORIG_table = $parsedQuery['TABLE'];
-
-               if (is_array($parsedQuery)) {
-
-                               // Process query based on type:
-                       switch ($parsedQuery['type']) {
-                               case 'CREATETABLE':
-                               case 'ALTERTABLE':
-                               case 'DROPTABLE':
-                                       if (file_exists(PATH_typo3conf.'temp_fieldInfo.php')) unlink(PATH_typo3conf.'temp_fieldInfo.php');
-                                       $this->map_genericQueryParsed($parsedQuery);
-                                       break;
-                               case 'INSERT':
-                                       $this->map_genericQueryParsed($parsedQuery);
-                                       break;
-                               case 'CREATEDATABASE':
-                                       die('Creating a database with DBAL is not supported. Did you really read the manual?');
-                                       break;
-                               default:
-                                       die('ERROR: Invalid Query type ('.$parsedQuery['type'].') for ->admin_query() function!: "'.htmlspecialchars($query).'"');
-                                       break;
-                       }
-
-                               // Setting query array (for other applications to access if needed)
-                       $this->lastParsedAndMappedQueryArray = $parsedQuery;
-
-                               // Execute query (based on handler derived from the TABLE name which we actually know for once!)
-                       $this->lastHandlerKey = $this->handler_getFromTableList($ORIG_table);
-                       switch ((string)$this->handlerCfg[$this->lastHandlerKey]['type']) {
-                               case 'native':
-                                               // Compiling query:
-                                       $compiledQuery =  $this->SQLparser->compileSQL($this->lastParsedAndMappedQueryArray);
-
-                                       if ($this->lastParsedAndMappedQueryArray['type']=='INSERT') {
-                                               return mysql_query($compiledQuery, $this->link);
-                                       }
-                                       return mysql_query($compiledQuery[0], $this->link);
-                                       break;
-                               case 'adodb':
-                                               // Compiling query:
-                                       $compiledQuery =  $this->SQLparser->compileSQL($this->lastParsedAndMappedQueryArray);
-                                       if ($this->lastParsedAndMappedQueryArray['type']=='INSERT') {
-                                               return $this->exec_INSERTquery($this->lastParsedAndMappedQueryArray['TABLE'],$compiledQuery);
-                                       }
-                                       return $this->handlerInstance[$this->lastHandlerKey]->DataDictionary->ExecuteSQLArray($compiledQuery);
-                                       break;
-                               case 'userdefined':
-                                               // Compiling query:
-                                       $compiledQuery =  $this->SQLparser->compileSQL($this->lastParsedAndMappedQueryArray);
-
-                                       return $this->handlerInstance[$this->lastHandlerKey]->admin_query($compiledQuery);
-                                       break;
-                       }
-               } else die('ERROR: Query could not be parsed: "'.htmlspecialchars($parsedQuery).'". Query: "'.htmlspecialchars($query).'"');
-       }
-
-
-
-
-
-
-
-
-
-
-       /************************************
-       *
-       * Handler management
-       *
-       **************************************/
-
-       /**
-        * Return the handler key pointing to an appropriate database handler as found in $this->handlerCfg array
-        * Notice: TWO or more tables in the table list MUST use the SAME handler key - otherwise a fatal error is thrown! (Logically, no database can possibly join two tables from separate sources!)
-        *
-        * @param       string          Table list, eg. "pages" or "pages, tt_content" or "pages AS A, tt_content AS B"
-        * @return      string          Handler key (see $this->handlerCfg array) for table
-        */
-       public function handler_getFromTableList($tableList) {
-
-               $key = $tableList;
-
-               if (!isset($this->cache_handlerKeyFromTableList[$key])) {
-
-                               // Get tables separated:
-                       $_tableList = $tableList;
-                       $tableArray = $this->SQLparser->parseFromTables($_tableList);
-
-                               // If success, traverse the tables:
-                       if (is_array($tableArray) && count($tableArray)) {
-                               $outputHandlerKey = '';
-
-                               foreach ($tableArray as $vArray) {
-                                               // Find handler key, select "_DEFAULT" if none is specifically configured:
-                                       $handlerKey = $this->table2handlerKeys[$vArray['table']] ? $this->table2handlerKeys[$vArray['table']] : '_DEFAULT';
-
-                                               // In case of separate handler keys for joined tables:
-                                       if ($outputHandlerKey && $handlerKey != $outputHandlerKey) {
-                                               die('DBAL fatal error: Tables in this list "'.$tableList.'" didn\'t use the same DB handler!');
-                                       }
-
-                                       $outputHandlerKey = $handlerKey;
-                               }
-
-                                       // Check initialized state; if handler is NOT initialized (connected) then we will connect it!
-                               if (!isset($this->handlerInstance[$outputHandlerKey])) {
-                                       $this->handler_init($outputHandlerKey);
-                               }
-
-                                       // Return handler key:
-                               $this->cache_handlerKeyFromTableList[$key] = $outputHandlerKey;
-                       } else {
-                               die('DBAL fatal error: No handler found in handler_getFromTableList() for: "'.$tableList.'" ('.$tableArray.')');
-                       }
-               }
-
-               return $this->cache_handlerKeyFromTableList[$key];
-       }
-
-       /**
-        * Initialize handler (connecting to database)
-        *
-        * @param       string          Handler key
-        * @return      boolean         If connection went well, return TRUE
-        * @see handler_getFromTableList()
-        */
-       public function handler_init($handlerKey) {
-
-                       // Find handler configuration:
-               $cfgArray = $this->handlerCfg[$handlerKey];
-               $handlerType = (string)$cfgArray['type'];
-               $output = FALSE;
-
-               if (is_array($cfgArray)) {
-                       switch ($handlerType) {
-                               case 'native':
-                                       if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['no_pconnect']) {
-                                               $link = mysql_connect($cfgArray['config']['host'].(isset($cfgArray['config']['port']) ? ':'.$cfgArray['config']['port'] : ''), $cfgArray['config']['username'], $cfgArray['config']['password'], TRUE);
-                                       } else {
-                                               $link = mysql_pconnect($cfgArray['config']['host'].(isset($cfgArray['config']['port']) ? ':'.$cfgArray['config']['port'] : ''), $cfgArray['config']['username'], $cfgArray['config']['password']);
-                                       }
-
-                                               // Set handler instance:
-                                       $this->handlerInstance[$handlerKey] = array('handlerType' => 'native', 'link' => $link);
-
-                                               // If link succeeded:
-                                       if ($link) {
-                                                       // For default, set ->link (see t3lib_DB)
-                                               if ($handlerKey == '_DEFAULT') {
-                                                       $this->link = $link;
-                                               }
-
-                                                       // Select database as well:
-                                               if (mysql_select_db($cfgArray['config']['database'], $link)) {
-                                                       $output = TRUE;
-                                               }
-                                               $setDBinit = t3lib_div::trimExplode(chr(10), $GLOBALS['TYPO3_CONF_VARS']['SYS']['setDBinit'], 1);
-                                               foreach ($setDBinit as $v) {
-                                                       if (mysql_query($v, $link) === FALSE) {
-                                                               t3lib_div::sysLog('Could not initialize DB connection with query "'.$v.'".','Core',3);
-                                                       }
-                                               }
-                                       } else {
-                                               t3lib_div::sysLog('Could not connect to MySQL server '.$cfgArray['config']['host'].' with user '.$cfgArray['config']['username'].'.','Core',4);
-                                       }
-                                       break;
-                               case 'adodb':
-                                       $output = TRUE;
-                                       require_once(t3lib_extMgm::extPath('adodb').'adodb/adodb.inc.php');
-                                       if (!defined('ADODB_FORCE_NULLS')) define('ADODB_FORCE_NULLS', 1);
-                                       $GLOBALS['ADODB_FORCE_TYPE'] = ADODB_FORCE_VALUE;
-                                       $GLOBALS['ADODB_FETCH_MODE'] = ADODB_FETCH_BOTH;
-
-                                       $this->handlerInstance[$handlerKey] = &ADONewConnection($cfgArray['config']['driver']);
-
-                                               // Set driver-specific options
-                                       if (isset($cfgArray['config']['driverOptions'])) {
-                                               foreach ($cfgArray['config']['driverOptions'] as $optionName => $optionValue) {
-                                                       $optionSetterName = 'set' . ucfirst($optionName);
-                                                       if (method_exists($this->handlerInstance[$handlerKey], $optionSetterName)) {
-                                                               $this->handlerInstance[$handlerKey]->$optionSetterName($optionValue);
-                                                       } else {
-                                                               $this->handlerInstance[$handlerKey]->$optionName = $optionValue;
-                                                       }
-                                               }
-                                       }
-
-                                       if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['no_pconnect']) {
-                                               $this->handlerInstance[$handlerKey]->Connect($cfgArray['config']['host'].(isset($cfgArray['config']['port']) ? ':'.$cfgArray['config']['port'] : ''),$cfgArray['config']['username'],$cfgArray['config']['password'],$cfgArray['config']['database']);
-                                       } else {
-                                               $this->handlerInstance[$handlerKey]->PConnect($cfgArray['config']['host'].(isset($cfgArray['config']['port']) ? ':'.$cfgArray['config']['port'] : ''),$cfgArray['config']['username'],$cfgArray['config']['password'],$cfgArray['config']['database']);
-                                       }
-                                       if (!$this->handlerInstance[$handlerKey]->isConnected()) {
-                                               $dsn = $cfgArray['config']['driver'].'://'.$cfgArray['config']['username'].
-                                                       (strlen($cfgArray['config']['password']) ? ':XXXX@' : '').
-                                                       $cfgArray['config']['host'].(isset($cfgArray['config']['port']) ? ':'.$cfgArray['config']['port'] : '').'/'.$cfgArray['config']['database'].
-                                                       ($GLOBALS['TYPO3_CONF_VARS']['SYS']['no_pconnect'] ? '' : '?persistent=1');
-                                               t3lib_div::sysLog('Could not connect to DB server using ADOdb on '.$cfgArray['config']['host'].' with user '.$cfgArray['config']['username'].'.','Core',4);
-                                               error_log('DBAL error: Connection to '.$dsn.' failed. Maybe PHP doesn\'t support the database?');
-                                               $output = FALSE;
-                                       } else {
-                                               $this->handlerInstance[$handlerKey]->DataDictionary  = NewDataDictionary($this->handlerInstance[$handlerKey]);
-                                               $this->handlerInstance[$handlerKey]->last_insert_id = 0;
-                                               if (isset($cfgArray['config']['sequenceStart'])) {
-                                                       $this->handlerInstance[$handlerKey]->sequenceStart = $cfgArray['config']['sequenceStart'];
-                                               } else {
-                                                       $this->handlerInstance[$handlerKey]->sequenceStart = 1;
-                                               }
-                                       }
-                                       break;
-                               case 'userdefined':
-                                               // Find class file:
-                                       $fileName = t3lib_div::getFileAbsFileName($cfgArray['config']['classFile']);
-                                       if (@is_file($fileName)) {
-                                               require_once($fileName);
-                                       } else die('DBAL error: "'.$fileName.'" was not a file to include.');
-
-                                               // Initialize:
-                                       $this->handlerInstance[$handlerKey] = t3lib_div::makeInstance($cfgArray['config']['class']);
-                                       $this->handlerInstance[$handlerKey]->init($cfgArray,$this);
-
-                                       if (is_object($this->handlerInstance[$handlerKey])) {
-                                               $output = TRUE;
-                                       }
-                                       break;
-                               default:
-                                       die('ERROR: Invalid handler type: "'.$cfgArray['type'].'"');
-                                       break;
-                       }
-
-                       return $output;
-               } else die('ERROR: No handler for key "'.$handlerKey.'"');
-       }
-
-
-       /**
-        * Checks whether the DBAL is currently inside an operation running on the "native" DB handler (i.e. MySQL)
-        *
-        * @return boolean      True if running on "native" DB handler (i.e. MySQL)
-        */
-       public function runningNative() {
-               return ((string)$this->handlerCfg[$this->lastHandlerKey]['type']==='native');
-       }
-
-
-       /**
-        * Checks whether the ADOdb handler is running with a driver that contains the argument
-        *
-        * @param string        $driver Driver name, matched with strstr().
-        * @return boolean      True if running with the given driver
-        */
-       public function runningADOdbDriver($driver) {
-               return strstr($this->handlerCfg[$this->lastHandlerKey]['config']['driver'], $driver);
-       }
-
-
-
-
-
-
-
-
-
-
-       /************************************
-       *
-       * Table/Field mapping
-       *
-       **************************************/
-
-       /**
-        * Checks if mapping is needed for a table(list)
-        *
-        * @param       string          List of tables in query
-        * @param       boolean         If TRUE, it will check only if FIELDs are configured and ignore the mapped table name if any.
-        * @return      mixed           Returns an array of table names (parsed version of input table) if mapping is needed, otherwise just FALSE.
-        */
-       protected function map_needMapping($tableList, $fieldMappingOnly = FALSE) {
-               $key = $tableList.'|'.$fieldMappingOnly;
-               if (!isset($this->cache_mappingFromTableList[$key])) {
-                       $this->cache_mappingFromTableList[$key] = FALSE;        // Default:
-
-                       $tables = $this->SQLparser->parseFromTables($tableList);
-                       if (is_array($tables)) {
-                               foreach ($tables as $tableCfg) {
-                                       if ($fieldMappingOnly) {
-                                               if (is_array($this->mapping[$tableCfg['table']]['mapFieldNames'])) {
-                                                       $this->cache_mappingFromTableList[$key] = $tables;
-                                               } elseif (is_array($tableCfg['JOIN'])) {
-                                                       foreach ($tableCfg['JOIN'] as $join) {
-                                                               if (is_array($this->mapping[$join['withTable']]['mapFieldNames'])) {
-                                                                       $this->cache_mappingFromTableList[$key] = $tables;
-                                                                       break;
-                                                               }
-                                                       }
-                                               }
-                                       } else {
-                                               if (is_array($this->mapping[$tableCfg['table']])) {
-                                                       $this->cache_mappingFromTableList[$key] = $tables;
-                                               } elseif (is_array($tableCfg['JOIN'])) {
-                                                       foreach ($tableCfg['JOIN'] as $join) {
-                                                               if (is_array($this->mapping[$join['withTable']])) {
-                                                                       $this->cache_mappingFromTableList[$key] = $tables;
-                                                                       break;
-                                                               }
-                                                       }
-                                               }
-                                       }
-                               }
-                       }
-               }
-
-               return $this->cache_mappingFromTableList[$key];
-       }
-
-       /**
-        * Takes an associated array with field => value pairs and remaps the field names if configured for this table in $this->mapping array.
-        * Be careful not to map a field name to another existing fields name (although you can use this to swap fieldnames of course...:-)
-        * Observe mapping problems with join-results (more than one table): Joined queries should always prefix the table name to avoid problems with this.
-        * Observe that alias fields are not mapped of course (should not be a problem though)
-        *
-        * @param       array           Input array, associative keys
-        * @param       array           Array of tables from the query. Normally just one table; many tables in case of a join. NOTICE: for multiple tables (with joins) there MIGHT occur trouble with fields of the same name in the two tables: This function traverses the mapping information for BOTH tables and applies mapping without checking from which table the field really came!
-        * @param       boolean         If TRUE, reverse direction. Default direction is to map an array going INTO the database (thus mapping TYPO3 fieldnames to PHYSICAL field names!)
-        * @return      array           Output array, with mapped associative keys.
-        */
-       protected function map_assocArray($input, $tables, $rev = FALSE) {
-                       // Traverse tables from query (hopefully only one table):
-               foreach ($tables as $tableCfg) {
-                       $tableKey = $this->getMappingKey($tableCfg['table']);
-                       if (is_array($this->mapping[$tableKey]['mapFieldNames'])) {
-
-                                       // Get the map (reversed if needed):
-                               if ($rev) {
-                                       $theMap = array_flip($this->mapping[$tableKey]['mapFieldNames']);
-                               } else {
-                                       $theMap = $this->mapping[$tableKey]['mapFieldNames'];
-                               }
-
-                                       // Traverse selected record, map fieldnames:
-                               $output = array();
-                               foreach ($input as $fN => $value) {
-
-                                               // Set the field name, change it if found in mapping array:
-                                       if ($theMap[$fN]) {
-                                               $newKey = $theMap[$fN];
-                                       } else {
-                                               $newKey = $fN;
-                                       }
-
-                                               // Set value to fieldname:
-                                       $output[$newKey] = $value;
-                               }
-
-                                       // When done, override the $input array with the result:
-                               $input = $output;
-                       }
-               }
-
-                       // Return input array (which might have been altered in the mean time)
-               return $input;
-       }
-
-       /**
-        * Remaps table/field names in a SELECT query's parts
-        * Notice: All arguments are passed by reference!
-        *
-        * @param       string          List of fields to select from the table. This is what comes right after "SELECT ...". Required value.
-        * @param       string          Table(s) from which to select. This is what comes right after "FROM ...". Require value.
-        * @param       string          Where clause. This is what comes right after "WHERE ...". Can be blank.
-        * @param       string          Group by field(s)
-        * @param       string          Order by field(s)
-        * @return      void
-        * @see exec_SELECTquery()
-        */
-       protected function map_remapSELECTQueryParts(&$select_fields, &$from_table, &$where_clause, &$groupBy, &$orderBy) {
-                       // Backup current mapping as it may be altered if aliases on mapped tables are found
-               $backupMapping = $this->mapping;
-
-                       // Tables:
-               $tables = $this->SQLparser->parseFromTables($from_table);
-               $defaultTable = $tables[0]['table'];
-                       // Prepare mapping for aliased tables. This will copy the definition of the original table name.
-                       // The alias is prefixed with a database-incompatible character to prevent naming clash with real table name
-                       // Further access to $this->mapping should be made through $this->getMappingKey() method
-               foreach ($tables as $k => $v) {
-                       if ($v['as'] && is_array($this->mapping[$v['table']]['mapFieldNames'])) {
-                               $mappingKey = $this->getFreeMappingKey($v['as']);
-                               $this->mapping[$mappingKey]['mapFieldNames'] =& $this->mapping[$v['table']]['mapFieldNames'];
-                       }
-                       if (is_array($v['JOIN'])) {
-                               foreach ($v['JOIN'] as $joinCnt => $join) {
-                                       if ($join['as'] && is_array($this->mapping[$join['withTable']]['mapFieldNames'])) {
-                                               $mappingKey = $this->getFreeMappingKey($join['as']);
-                                               $this->mapping[$mappingKey]['mapFieldNames'] =& $this->mapping[$join['withTable']]['mapFieldNames'];
-                                       }
-                               }
-                       }
-               }
-               foreach ($tables as $k => $v) {
-                       $tableKey = $this->getMappingKey($v['table']);
-                       if ($this->mapping[$tableKey]['mapTableName']) {
-                               $tables[$k]['table'] = $this->mapping[$tableKey]['mapTableName'];
-                       }
-                               // Mapping JOINS
-                       if (is_array($v['JOIN'])) {
-                               foreach($v['JOIN'] as $joinCnt => $join) {
-                                               // Mapping withTable of the JOIN
-                                       $withTableKey = $this->getMappingKey($join['withTable']);
-                                       if ($this->mapping[$withTableKey]['mapTableName']) {
-                                               $tables[$k]['JOIN'][$joinCnt]['withTable'] = $this->mapping[$withTableKey]['mapTableName'];
-                                       }
-                                       $onPartsArray = array();
-                                               // Mapping ON parts of the JOIN
-                                       if (is_array($tables[$k]['JOIN'][$joinCnt]['ON'])) {
-                                               foreach ($tables[$k]['JOIN'][$joinCnt]['ON'] as &$condition) {
-                                                               // Left side of the comparator
-                                                       $leftTableKey = $this->getMappingKey($condition['left']['table']);
-                                                       if (isset($this->mapping[$leftTableKey]['mapFieldNames'][$condition['left']['field']])) {
-                                                               $condition['left']['field'] = $this->mapping[$leftTableKey]['mapFieldNames'][$condition['left']['field']];
-                                                       }
-                                                       if (isset($this->mapping[$leftTableKey]['mapTableName'])) {
-                                                               $condition['left']['table'] = $this->mapping[$leftTableKey]['mapTableName'];
-                                                       }
-                                                               // Right side of the comparator
-                                                       $rightTableKey = $this->getMappingKey($condition['right']['table']);
-                                                       if (isset($this->mapping[$rightTableKey]['mapFieldNames'][$condition['right']['field']])) {
-                                                               $condition['right']['field'] = $this->mapping[$rightTableKey]['mapFieldNames'][$condition['right']['field']];
-                                                       }
-                                                       if (isset($this->mapping[$rightTableKey]['mapTableName'])) {
-                                                               $condition['right']['table'] = $this->mapping[$rightTableKey]['mapTableName'];
-                                                       }
-                                               }
-                                       }
-                               }
-                       }
-               }
-               $from_table = $this->SQLparser->compileFromTables($tables);
-
-                       // Where clause:
-               $whereParts = $this->SQLparser->parseWhereClause($where_clause);
-               $this->map_sqlParts($whereParts,$defaultTable);
-               $where_clause = $this->SQLparser->compileWhereClause($whereParts, FALSE);
-
-                       // Select fields:
-               $expFields = $this->SQLparser->parseFieldList($select_fields);
-               $this->map_sqlParts($expFields,$defaultTable);
-               $select_fields = $this->SQLparser->compileFieldList($expFields);
-
-                       // Group By fields
-               $expFields = $this->SQLparser->parseFieldList($groupBy);
-               $this->map_sqlParts($expFields,$defaultTable);
-               $groupBy = $this->SQLparser->compileFieldList($expFields);
-
-                       // Order By fields
-               $expFields = $this->SQLparser->parseFieldList($orderBy);
-               $this->map_sqlParts($expFields,$defaultTable);
-               $orderBy = $this->SQLparser->compileFieldList($expFields);
-
-                       // Restore the original mapping
-               $this->mapping = $backupMapping;
-       }
-
-       /**
-        * Returns the key to be used when retrieving information from $this->mapping. This ensures
-        * that mapping from aliased tables is properly retrieved.
-        *
-        * @param string $tableName
-        * @return string
-        */
-       protected function getMappingKey($tableName) {
-                       // Search deepest alias mapping
-               while (isset($this->mapping['*' . $tableName])) {
-                       $tableName = '*' . $tableName;
-               }
-               return $tableName;
-       }
-
-       /**
-        * Returns a free key to be used to store mapping information in $this->mapping.
-        *
-        * @param string $tableName
-        * @return string
-        */
-       protected function getFreeMappingKey($tableName) {
-               while (isset($this->mapping[$tableName])) {
-                       $tableName = '*' . $tableName;
-               }
-               return $tableName;
-       }
-
-       /**
-        * Generic mapping of table/field names arrays (as parsed by tx_dbal_sqlengine)
-        *
-        * @param       array           Array with parsed SQL parts; Takes both fields, tables, where-parts, group and order-by. Passed by reference.
-        * @param       string          Default table name to assume if no table is found in $sqlPartArray
-        * @return      void
-        * @access private
-        * @see map_remapSELECTQueryParts()
-        */
-       protected function map_sqlParts(&$sqlPartArray, $defaultTable) {
-               $defaultTableKey = $this->getMappingKey($defaultTable);
-                       // Traverse sql Part array:
-               if (is_array($sqlPartArray)) {
-                       foreach ($sqlPartArray as $k => $v) {
-
-                                       // Look for sublevel (WHERE parts only)
-                               if (is_array($sqlPartArray[$k]['sub'])) {
-                                       $this->map_sqlParts($sqlPartArray[$k]['sub'], $defaultTable);   // Call recursively!
-                               } else {
-                                               // For the field, look for table mapping (generic):
-                                       $t = $sqlPartArray[$k]['table'] ? $sqlPartArray[$k]['table'] : $defaultTable;
-                                       $t = $this->getMappingKey($t);
-
-                                               // Mapping field name, if set:
-                                       if (is_array($this->mapping[$t]['mapFieldNames']) && isset($this->mapping[$t]['mapFieldNames'][$sqlPartArray[$k]['field']])) {
-                                               $sqlPartArray[$k]['field'] = $this->mapping[$t]['mapFieldNames'][$sqlPartArray[$k]['field']];
-                                       }
-
-                                               // Mapping field name in SQL-functions like MIN(), MAX() or SUM()
-                                       if ($this->mapping[$t]['mapFieldNames']) {
-                                               $fieldArray = explode('.', $sqlPartArray[$k]['func_content']);
-                                               if (count($fieldArray) == 1 && is_array($this->mapping[$t]['mapFieldNames']) && isset($this->mapping[$t]['mapFieldNames'][$fieldArray[0]])) {
-                                                       $sqlPartArray[$k]['func_content.'][0]['func_content'] = $this->mapping[$t]['mapFieldNames'][$fieldArray[0]];
-                                                       $sqlPartArray[$k]['func_content'] = $this->mapping[$t]['mapFieldNames'][$fieldArray[0]];
-                                               }
-                                               elseif (count($fieldArray) == 2) {
-                                                               // Map the external table
-                                                       $table = $fieldArray[0];
-                                                       $tableKey = $this->getMappingKey($table);
-                                                       if (isset($this->mapping[$tableKey]['mapTableName'])) {
-                                                               $table = $this->mapping[$tableKey]['mapTableName'];
-                                                       }
-                                                               // Map the field itself
-                                                       $field = $fieldArray[1];
-                                                       if (is_array($this->mapping[$tableKey]['mapFieldNames']) && isset($this->mapping[$tableKey]['mapFieldNames'][$fieldArray[1]])) {
-                                                               $field = $this->mapping[$tableKey]['mapFieldNames'][$fieldArray[1]];
-                                                       }
-                                                       $sqlPartArray[$k]['func_content.'][0]['func_content'] = $table . '.' . $field;
-                                                       $sqlPartArray[$k]['func_content'] = $table . '.' . $field;
-                                               }
-                                       }
-
-                                               // Do we have a function (e.g., CONCAT)
-                                       if (isset($v['value']['operator'])) {
-                                               foreach ($sqlPartArray[$k]['value']['args'] as $argK => $fieldDef) {
-                                                       $tableKey = $this->getMappingKey($fieldDef['table']);
-                                                       if (isset($this->mapping[$tableKey]['mapTableName'])) {
-                                                               $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']];
-                                                       }
-                                               }
-                                       }
-
-                                               // Do we have a subquery (WHERE parts only)?
-                                       if (isset($sqlPartArray[$k]['subquery'])) {
-                                               $this->map_subquery($sqlPartArray[$k]['subquery']);
-                                       }
-
-                                               // 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])) {
-                                               $fieldArray = explode('.', $sqlPartArray[$k]['value'][0]);
-                                               if (count($fieldArray) == 1 && is_array($this->mapping[$t]['mapFieldNames']) && isset($this->mapping[$t]['mapFieldNames'][$fieldArray[0]])) {
-                                                       $sqlPartArray[$k]['value'][0] = $this->mapping[$t]['mapFieldNames'][$fieldArray[0]];
-                                               } elseif (count($fieldArray) == 2) {
-                                                               // Map the external table
-                                                       $table = $fieldArray[0];
-                                                       $tableKey = $this->getMappingKey($table);
-                                                       if (isset($this->mapping[$tableKey]['mapTableName'])) {
-                                                               $table = $this->mapping[$tableKey]['mapTableName'];
-                                                       }
-                                                               // Map the field itself
-                                                       $field = $fieldArray[1];
-                                                       if (is_array($this->mapping[$tableKey]['mapFieldNames']) && isset($this->mapping[$tableKey]['mapFieldNames'][$fieldArray[1]])) {
-                                                               $field = $this->mapping[$tableKey]['mapFieldNames'][$fieldArray[1]];
-                                                       }
-                                                       $sqlPartArray[$k]['value'][0] = $table . '.' . $field;
-                                               }
-                                       }
-
-                                               // Map table?
-                                       $tableKey = $this->getMappingKey($sqlPartArray[$k]['table']);
-                                       if ($sqlPartArray[$k]['table'] && $this->mapping[$tableKey]['mapTableName']) {
-                                               $sqlPartArray[$k]['table'] = $this->mapping[$tableKey]['mapTableName'];
-                                       }
-                               }
-                       }
-               }
-       }
-
-       /**
-        * Maps table and field names in a subquery.
-        *
-        * @param array $parsedQuery
-        * @return void
-        */
-       protected function map_subquery(&$parsedQuery) {
-                       // Backup current mapping as it may be altered
-               $backupMapping = $this->mapping;
-
-               foreach ($parsedQuery['FROM'] as $k => $v) {
-                       $mappingKey = $v['table'];
-                       if ($v['as'] && is_array($this->mapping[$v['table']]['mapFieldNames'])) {
-                               $mappingKey = $this->getFreeMappingKey($v['as']);
-                       } else {
-                                       // Should ensure that no alias is defined in the external query
-                                       // which would correspond to a real table name in the subquery
-                               if ($this->getMappingKey($v['table']) !== $v['table']) {
-                                       $mappingKey = $this->getFreeMappingKey($v['table']);
-                                               // This is the only case when 'mapTableName' should be copied
-                                       $this->mapping[$mappingKey]['mapTableName'] =& $this->mapping[$v['table']]['mapTableName'];
-                               }
-                       }
-                       if ($mapping !== $v['table']) {
-                               $this->mapping[$mappingKey]['mapFieldNames'] =& $this->mapping[$v['table']]['mapFieldNames'];
-                       }
-               }
-
-                       // Perform subquery's remapping
-               $defaultTable = $parsedQuery['FROM'][0]['table'];
-               $this->map_sqlParts($parsedQuery['SELECT'], $defaultTable);
-               $this->map_sqlParts($parsedQuery['FROM'], $defaultTable);
-               $this->map_sqlParts($parsedQuery['WHERE'], $defaultTable);
-
-                       // Restore the mapping
-               $this->mapping = $backupMapping;
-       }
-
-       /**
-        * Will do table/field mapping on a general tx_dbal_sqlengine-compliant SQL query
-        * (May still not support all query types...)
-        *
-        * @param       array           Parsed QUERY as from tx_dbal_sqlengine::parseSQL(). NOTICE: Passed by reference!
-        * @return      void
-        * @see tx_dbal_sqlengine::parseSQL()
-        */
-       protected function map_genericQueryParsed(&$parsedQuery) {
-
-                       // Getting table - same for all:
-               $table = $parsedQuery['TABLE'];
-               if ($table) {
-                               // Do field mapping if needed:
-                       if ($tableArray = $this->map_needMapping($table)) {
-
-                                       // Table name:
-                               if ($this->mapping[$table]['mapTableName']) {
-                                       $parsedQuery['TABLE'] = $this->mapping[$table]['mapTableName'];
-                               }
-
-                                       // Based on type, do additional changes:
-                               switch ($parsedQuery['type']) {
-                                       case 'ALTERTABLE':
-
-                                               // Changing field name:
-                                       $newFieldName = $this->mapping[$table]['mapFieldNames'][$parsedQuery['FIELD']];
-                                       if ($newFieldName) {
-                                               if ($parsedQuery['FIELD'] == $parsedQuery['newField']) {
-                                                       $parsedQuery['FIELD'] = $parsedQuery['newField'] = $newFieldName;
-                                               } else $parsedQuery['FIELD'] = $newFieldName;
-                                       }
-
-                                               // Changing key field names:
-                                       if (is_array($parsedQuery['fields'])) {
-                                               $this->map_fieldNamesInArray($table,$parsedQuery['fields']);
-                                       }
-                                       break;
-                                       case 'CREATETABLE':
-                                               // Remapping fields:
-                                       if (is_array($parsedQuery['FIELDS'])) {
-                                               $newFieldsArray = array();
-                                               foreach ($parsedQuery['FIELDS'] as $fN => $fInfo) {
-                                                       if ($this->mapping[$table]['mapFieldNames'][$fN]) {
-                                                               $fN = $this->mapping[$table]['mapFieldNames'][$fN];
-                                                       }
-                                                       $newFieldsArray[$fN] = $fInfo;
-                                               }
-                                               $parsedQuery['FIELDS'] = $newFieldsArray;
-                                       }
-
-                                               // Remapping keys:
-                                       if (is_array($parsedQuery['KEYS'])) {
-                                               foreach ($parsedQuery['KEYS'] as $kN => $kInfo) {
-                                                       $this->map_fieldNamesInArray($table,$parsedQuery['KEYS'][$kN]);
-                                               }
-                                       }
-                                       break;
-
-                                       /// ... and here support for all other query types should be!
-
-                               }
-                       }
-               } else die('ERROR, mapping: No table found in parsed Query array...');
-       }
-
-       /**
-        * Re-mapping field names in array
-        *
-        * @param       string          (TYPO3) Table name for fields.
-        * @param       array           Array of fieldnames to remap. Notice: Passed by reference!
-        * @return      void
-        */
-       protected function map_fieldNamesInArray($table,&$fieldArray) {
-               if (is_array($this->mapping[$table]['mapFieldNames'])) {
-                       foreach ($fieldArray as $k => $v) {
-                               if ($this->mapping[$table]['mapFieldNames'][$v]) {
-                                       $fieldArray[$k] = $this->mapping[$table]['mapFieldNames'][$v];
-                               }
-                       }
-               }
-       }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-       /**************************************
-       *
-       * Debugging
-       *
-       **************************************/
-
-       /**
-        * Debug handler for query execution
-        *
-        * @param       string          Function name from which this function is called.
-        * @param       string          Execution time in ms of the query
-        * @param       array           In-data of various kinds.
-        * @return      void
-        * @access private
-        */
-       public function debugHandler($function,$execTime,$inData) {
-                       // we don't want to log our own log/debug SQL
-               $script = substr(PATH_thisScript,strlen(PATH_site));
-
-               if (substr($script,-strlen('dbal/mod1/index.php'))!='dbal/mod1/index.php' && !strstr($inData['args'][0], 'tx_dbal_debuglog')) {
-                       $data = array();
-                       $errorFlag = 0;
-                       $joinTable = '';
-
-                       if ($this->sql_error()) {
-                               $data['sqlError'] = $this->sql_error();
-                               $errorFlag|=1;
-                       }
-
-                               // if lastQuery is empty (for whatever reason) at least log inData.args
-                       if (empty($this->lastQuery)) {
-                               $query = implode(' ', $inData['args']);
-                       } else {
-                               $query = $this->lastQuery;
-                       }
-
-                       if ($this->conf['debugOptions']['backtrace']) {
-                               $backtrace = debug_backtrace();
-                               unset($backtrace[0]); // skip this very method :)
-                               $data['backtrace'] = array_slice($backtrace, 0, $this->conf['debugOptions']['backtrace']);
-                       }
-
-                       switch ($function) {
-                               case 'exec_INSERTquery':
-                               case 'exec_UPDATEquery':
-                               case 'exec_DELETEquery':
-                                       $this->debug_log($query,$execTime,$data,$joinTable,$errorFlag, $script);
-                                       break;
-
-                               case 'exec_SELECTquery':
-                                               // Get explain data:
-                                       if ($this->conf['debugOptions']['EXPLAIN'] && t3lib_div::inList('adodb,native',$inData['handlerType'])) {
-                                               $data['EXPLAIN'] = $this->debug_explain($this->lastQuery);
-                                       }
-
-                                               // Check parsing of Query:
-                                       if ($this->conf['debugOptions']['parseQuery']) {
-                                               $parseResults = array();
-                                               $parseResults['SELECT'] = $this->SQLparser->debug_parseSQLpart('SELECT',$inData['args'][1]);
-                                               $parseResults['FROM'] = $this->SQLparser->debug_parseSQLpart('FROM',$inData['args'][0]);
-                                               $parseResults['WHERE'] = $this->SQLparser->debug_parseSQLpart('WHERE',$inData['args'][2]);
-                                               $parseResults['GROUPBY'] = $this->SQLparser->debug_parseSQLpart('SELECT',$inData['args'][3]);   // Using select field list syntax
-                                               $parseResults['ORDERBY'] = $this->SQLparser->debug_parseSQLpart('SELECT',$inData['args'][4]);   // Using select field list syntax
-
-                                               foreach ($parseResults as $k => $v) {
-                                                       if (!strlen($parseResults[$k])) unset($parseResults[$k]);
-                                               }
-                                               if (count($parseResults)) {
-                                                       $data['parseError'] = $parseResults;
-                                                       $errorFlag|=2;
-                                               }
-                                       }
-
-                                               // Checking joinTables:
-                                       if ($this->conf['debugOptions']['joinTables']) {
-                                               if (count(explode(',', $inData['ORIG_from_table']))>1) {
-                                                       $joinTable = $inData['args'][0];
-                                               }
-                                       }
-
-                                               // Logging it:
-                                       $this->debug_log($query,$execTime,$data,$joinTable,$errorFlag, $script);
-                                       if (!empty($inData['args'][2]))
-                                               $this->debug_WHERE($inData['args'][0], $inData['args'][2], $script);
-                                       break;
-                       }
-               }
-       }
-
-       /**
-        * Logs the where clause for debugging purposes.
-        *
-        * @param string $table Table name(s) the query was targeted at
-        * @param string $where The WHERE clause to be logged
-        * @param string $script        The script calling the logging
-        * @return void
-        */
-       public function debug_WHERE($table, $where, $script = '') {
-               $insertArray = array (
-                       'tstamp' => $GLOBALS['EXEC_TIME'],
-                       'beuser_id' => intval($GLOBALS['BE_USER']->user['uid']),
-                       'script' => $script,
-                       'tablename' => $table,
-                       'whereclause' => $where
-               );
-
-               $this->exec_INSERTquery('tx_dbal_debuglog_where', $insertArray);
-       }
-
-       /**
-        * Inserts row in the log table
-        *
-        * @param       string          The current query
-        * @param       integer         Execution time of query in milliseconds
-        * @param       array           Data to be stored serialized.
-        * @param       string          Join string if there IS a join.
-        * @param       integer         Error status.
-        * @param string $script        The script calling the logging
-        * @return      void
-        */
-       public function debug_log($query,$ms,$data,$join,$errorFlag, $script='') {
-               if (is_array($query)) {
-                       $queryToLog = $query[0].' --  ';
-                       if (count($query[1])) {
-                               $queryToLog .= count($query[1]).' BLOB FIELDS: '.implode(', ',array_keys($query[1]));
-                       }
-                       if (count($query[2])) {
-                               $queryToLog .= count($query[2]).' CLOB FIELDS: '.implode(', ',array_keys($query[2]));
-                       }
-               } else {
-                       $queryToLog = $query;
-               }
-               $insertArray = array (
-                       'tstamp' => $GLOBALS['EXEC_TIME'],
-                       'beuser_id' => intval($GLOBALS['BE_USER']->user['uid']),
-                       'script' => $script,
-                       'exec_time' => $ms,
-                       'table_join' => $join,
-                       'serdata' => serialize($data),
-                       'query' => $queryToLog,
-                       'errorFlag' => $errorFlag
-               );
-
-               $this->exec_INSERTquery('tx_dbal_debuglog', $insertArray);
-       }
-
-       /**
-        * Perform EXPLAIN query on DEFAULT handler!
-        *
-        * @param       string          SELECT Query
-        * @return      array           The Explain result rows in an array
-        * @todo        Not supporting other than the default handler? And what about DBMS of other kinds than MySQL - support for EXPLAIN?
-        */
-       public function debug_explain($query) {
-               $output = array();
-               $hType = (string)$this->handlerCfg[$this->lastHandlerKey]['type'];
-               switch ($hType) {
-                       case 'native':
-                               $res = $this->sql_query('EXPLAIN '.$query);
-                               while($row = $this->sql_fetch_assoc($res)) {
-                                       $output[] = $row;
-                               }
-                               break;
-                       case 'adodb':
-                               switch ($this->handlerCfg['_DEFAULT']['config']['driver']) {
-                                       case 'oci8':
-                                               $res = $this->sql_query('EXPLAIN PLAN '.$query);
-                                               $output[] = 'EXPLAIN PLAN data logged to default PLAN_TABLE';
-                                               break;
-                                       default:
-                                               $res = $this->sql_query('EXPLAIN '.$query);
-                                               while($row = $this->sql_fetch_assoc($res)) {
-                                                       $output[] = $row;
-                                               }
-                                               break;
-                               }
-                       break;
-               }
-
-               return $output;
-       }
-}
-
-
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dbal/class.ux_t3lib_db.php']) {
-       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dbal/class.ux_t3lib_db.php']);
-}
-
-?>
\ No newline at end of file
diff --git a/typo3/sysext/dbal/class.ux_t3lib_sqlparser.php b/typo3/sysext/dbal/class.ux_t3lib_sqlparser.php
deleted file mode 100644 (file)
index 26933db..0000000
+++ /dev/null
@@ -1,443 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2004-2009 Kasper Skaarhoj (kasperYYYY@typo3.com)
-*  (c) 2004-2009 Karsten Dambekalns <karsten@typo3.org>
-*  (c) 2009-2010 Xavier Perseguers <typo3@perseguers.ch>
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-*
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*  A copy is found in the textfile GPL.txt and important notices to the license
-*  from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-/**
- * PHP SQL engine
- *
- * $Id: class.ux_t3lib_sqlparser.php 36761 2010-08-14 16:00:33Z xperseguers $
- *
- * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
- * @author     Karsten Dambekalns <k.dambekalns@fishfarm.de>
- * @author     Xavier Perseguers <typo3@perseguers.ch>
- */
-
-
-/**
- * PHP SQL engine / server
- *
- * @author     Kasper Skaarhoj <kasper@typo3.com>
- * @package TYPO3
- * @subpackage t3lib
- */
-class ux_t3lib_sqlparser extends t3lib_sqlparser {
-
-       /**
-        * Compiles a "SELECT [output] FROM..:" field list based on input array (made with ->parseFieldList())
-        * Can also compile field lists for ORDER BY and GROUP BY.
-        *
-        * @param       array           Array of select fields, (made with ->parseFieldList())
-        * @param       boolean         Whether comments should be compiled
-        * @return      string          Select field string
-        * @see parseFieldList()
-        */
-       public function compileFieldList($selectFields, $compileComments = TRUE) {
-                       // TODO: Handle SQL hints in comments according to current DBMS
-               return parent::compileFieldList($selectFields, FALSE);
-       }
-
-       /**
-        * Add slashes function used for compiling queries
-        * This method overrides the method from t3lib_sqlparser because
-        * the input string is already properly escaped.
-        *
-        * @param       string          Input string
-        * @return      string          Output string
-        */
-       protected function compileAddslashes($str) {
-               return $str;
-       }
-
-       /*************************
-        *
-        * Compiling queries
-        *
-        *************************/
-
-       /**
-        * Compiles an INSERT statement from components array
-        *
-        * @param array Array of SQL query components
-        * @return string SQL INSERT query
-        * @see parseINSERT()
-        */
-       protected function compileINSERT($components) {
-               switch ((string)$GLOBALS['TYPO3_DB']->handlerCfg[$GLOBALS['TYPO3_DB']->lastHandlerKey]['type']) {
-                       case 'native':
-                               $query = parent::compileINSERT($components);
-                               break;
-                       case 'adodb':
-                               if (isset($components['VALUES_ONLY']) && is_array($components['VALUES_ONLY'])) {
-                                       $fields = $GLOBALS['TYPO3_DB']->cache_fieldType[$components['TABLE']];
-                                       $fc = 0;
-                                       foreach ($fields as $fn => $fd) {
-                                               $query[$fn] = $components['VALUES_ONLY'][$fc++][0];
-                                       }
-                               } else {
-                                               // Initialize:
-                                       foreach ($components['FIELDS'] as $fN => $fV) {
-                                               $query[$fN]=$fV[0];
-                                       }
-                               }
-                               break;
-               }
-
-               return $query;
-       }
-
-       /**
-        * Compiles a DROP TABLE statement from components array
-        *
-        * @param array Array of SQL query components
-        * @return string SQL DROP TABLE query
-        * @see compileSQL()
-        */
-       private function compileDROPTABLE($components) {
-               switch ((string)$GLOBALS['TYPO3_DB']->handlerCfg[$GLOBALS['TYPO3_DB']->lastHandlerKey]['type']) {
-                       case 'native':
-                               $query = 'DROP TABLE' . ($components['ifExists'] ? ' IF EXISTS' : '') . ' ' . $components['TABLE'];
-                               break;
-                       case 'adodb':
-                               $handlerKey = $GLOBALS['TYPO3_DB']->handler_getFromTableList($components['TABLE']);
-                               $tableName = $GLOBALS['TYPO3_DB']->quoteName($components['TABLE'], $handlerKey, TRUE);
-                               $query = $GLOBALS['TYPO3_DB']->handlerInstance[$handlerKey]->DataDictionary->DropTableSQL($tableName);
-                               break;
-               }
-
-               return $query;
-       }
-
-       /**
-        * Compiles a CREATE TABLE statement from components array
-        *
-        * @param       array           Array of SQL query components
-        * @return      array           array with SQL CREATE TABLE/INDEX command(s)
-        * @see parseCREATETABLE()
-        */
-       public function compileCREATETABLE($components) {
-                       // Execute query (based on handler derived from the TABLE name which we actually know for once!)
-               switch ((string)$GLOBALS['TYPO3_DB']->handlerCfg[$GLOBALS['TYPO3_DB']->handler_getFromTableList($components['TABLE'])]['type']) {
-                       case 'native':
-                               $query[] = parent::compileCREATETABLE($components);
-                               break;
-                       case 'adodb':
-                                       // Create fields and keys:
-                               $fieldsKeys = array();
-                               $indexKeys = array();
-
-                               foreach ($components['FIELDS'] as $fN => $fCfg) {
-                                       $handlerKey = $GLOBALS['TYPO3_DB']->handler_getFromTableList($components['TABLE']);
-                                       $fieldsKeys[$fN] = $GLOBALS['TYPO3_DB']->quoteName($fN, $handlerKey, TRUE) . ' ' . $this->compileFieldCfg($fCfg['definition']);
-                               }
-
-                               if (isset($components['KEYS']) && is_array($components['KEYS'])) {
-                                       foreach($components['KEYS'] as $kN => $kCfg) {
-                                               if ($kN === 'PRIMARYKEY') {
-                                                       foreach ($kCfg as $n => $field) {
-                                                               $fieldsKeys[$field] .= ' PRIMARY';
-                                                       }
-                                               } elseif ($kN === 'UNIQUE') {
-                                                       foreach ($kCfg as $n => $field) {
-                                                               $indexKeys = array_merge($indexKeys, $GLOBALS['TYPO3_DB']->handlerInstance[$GLOBALS['TYPO3_DB']->handler_getFromTableList($components['TABLE'])]->DataDictionary->CreateIndexSQL($n, $components['TABLE'], $field, array('UNIQUE')));
-                                                       }
-                                               } else {
-                                                       $indexKeys = array_merge($indexKeys, $GLOBALS['TYPO3_DB']->handlerInstance[$GLOBALS['TYPO3_DB']->handler_getFromTableList($components['TABLE'])]->DataDictionary->CreateIndexSQL($components['TABLE'] . '_' . $kN, $components['TABLE'], $kCfg));
-                                               }
-                                       }
-                               }
-
-                                       // Generally create without OID on PostgreSQL
-                               $tableOptions = array('postgres' => 'WITHOUT OIDS');
-
-                                       // Fetch table/index generation query:
-                               $tableName = $GLOBALS['TYPO3_DB']->quoteName($components['TABLE'], NULL, TRUE);
-                               $query = array_merge($GLOBALS['TYPO3_DB']->handlerInstance[$GLOBALS['TYPO3_DB']->lastHandlerKey]->DataDictionary->CreateTableSQL($tableName, implode(',' . chr(10), $fieldsKeys), $tableOptions), $indexKeys);
-                               break;
-               }
-
-               return $query;
-       }
-
-       /**
-        * Compiles an ALTER TABLE statement from components array
-        *
-        * @param array Array of SQL query components
-        * @return string SQL ALTER TABLE query
-        * @see parseALTERTABLE()
-        */
-       public function compileALTERTABLE($components) {
-                       // Execute query (based on handler derived from the TABLE name which we actually know for once!)
-               switch ((string)$GLOBALS['TYPO3_DB']->handlerCfg[$GLOBALS['TYPO3_DB']->lastHandlerKey]['type']) {
-                       case 'native':
-                               $query[] = parent::compileALTERTABLE($components);
-                               break;
-                       case 'adodb':
-                               $tableName = $GLOBALS['TYPO3_DB']->quoteName($components['TABLE'], NULL, TRUE);
-                               $fieldName = $GLOBALS['TYPO3_DB']->quoteName($components['FIELD'], NULL, TRUE);
-                               switch (strtoupper(str_replace(array(' ', "\n", "\r", "\t"), '', $components['action']))) {
-                                       case 'ADD':
-                                               $query = $GLOBALS['TYPO3_DB']->handlerInstance[$GLOBALS['TYPO3_DB']->lastHandlerKey]->DataDictionary->AddColumnSQL($tableName, $fieldName . ' ' . $this->compileFieldCfg($components['definition']));
-                                               break;
-                                       case 'CHANGE':
-                                               $query = $GLOBALS['TYPO3_DB']->handlerInstance[$GLOBALS['TYPO3_DB']->lastHandlerKey]->DataDictionary->AlterColumnSQL($tableName, $fieldName . ' ' . $this->compileFieldCfg($components['definition']));
-                                               break;
-                                       case 'DROP':
-                                       case 'DROPKEY':
-                                               break;
-                                       case 'ADDKEY':
-                                       case 'ADDPRIMARYKEY':
-                                       case 'ADDUNIQUE':
-                                               $query .= ' (' . implode(',', $components['fields']) . ')';
-                                               break;
-                               }
-                               break;
-               }
-
-               return $query;
-       }
-
-       /**
-        * Compile field definition
-        *
-        * @param       array           Field definition parts
-        * @return      string          Field definition string
-        */
-       public function compileFieldCfg($fieldCfg) {
-               switch ((string)$GLOBALS['TYPO3_DB']->handlerCfg[$GLOBALS['TYPO3_DB']->lastHandlerKey]['type']) {
-                       case 'native':
-                               $cfg = parent::compileFieldCfg($fieldCfg);
-                               break;
-                       case 'adodb':
-                                       // Set type:
-                               $type = $GLOBALS['TYPO3_DB']->MySQLMetaType($fieldCfg['fieldType']);
-                               $cfg = $type;
-
-                                       // Add value, if any:
-                               if (strlen($fieldCfg['value']) && (in_array($type, array('C', 'C2')))) {
-                                       $cfg .= ' '.$fieldCfg['value'];
-                               } elseif (!isset($fieldCfg['value']) && (in_array($type, array('C', 'C2')))) {
-                                       $cfg .= ' 255'; // add 255 as length for varchar without specified length (e.g. coming from tinytext, tinyblob)
-                               }
-
-                                       // Add additional features:
-                               $noQuote = TRUE;
-                               if (is_array($fieldCfg['featureIndex'])) {
-
-                                               // MySQL assigns DEFAULT value automatically if NOT NULL, fake this here
-                                               // numeric fields get 0 as default, other fields an empty string
-                                       if (isset($fieldCfg['featureIndex']['NOTNULL']) && !isset($fieldCfg['featureIndex']['DEFAULT']) && !isset($fieldCfg['featureIndex']['AUTO_INCREMENT'])) {
-                                               switch ($type) {
-                                                       case 'I8':
-                                                       case 'F':
-                                                       case 'N':
-                                                               $fieldCfg['featureIndex']['DEFAULT'] = array('keyword' => 'DEFAULT', 'value' => array('0', ''));
-                                                               break;
-                                                       default:
-                                                               $fieldCfg['featureIndex']['DEFAULT'] = array('keyword' => 'DEFAULT', 'value' => array('', '\''));
-                                               }
-                                       }
-
-                                       foreach ($fieldCfg['featureIndex'] as $feature => $featureDef) {
-                                               switch (TRUE) {
-                                                               // unsigned only for mysql, as it is mysql specific
-                                                       case ($feature === 'UNSIGNED' && !$GLOBALS['TYPO3_DB']->runningADOdbDriver('mysql')):
-                                                               // auto_increment is removed, it is handled by (emulated) sequences
-                                                       case ($feature === 'AUTO_INCREMENT'):
-                                                               // never add NOT NULL if running on Oracle and we have an empty string as default
-                                                       case ($feature === 'NOTNULL' && $GLOBALS['TYPO3_DB']->runningADOdbDriver('oci8')):
-                                                               continue;
-                                                       case ($feature === 'NOTNULL'):
-                                                               $cfg .= ' NOTNULL';
-                                                               break;
-                                                       default:
-                                                               $cfg .= ' ' . $featureDef['keyword'];
-                                               }
-
-                                                       // Add value if found:
-                                               if (is_array($featureDef['value'])) {
-                                                       if ($featureDef['value'][0] === '') {
-                                                               $cfg .= ' "\'\'"';
-                                                       } else {
-                                                               $cfg .= ' ' . $featureDef['value'][1] . $this->compileAddslashes($featureDef['value'][0]) . $featureDef['value'][1];
-                                                               if (!is_numeric($featureDef['value'][0])) {
-                                                                       $noQuote = FALSE;
-                                                               }
-                                                       }
-                                               }
-                                       }
-                               }
-                               if ($noQuote) {
-                                       $cfg .= ' NOQUOTE';
-                               }
-                               break;
-               }
-
-                       // Return field definition string:
-               return $cfg;
-       }
-
-       /**
-        * Checks if the submitted feature index contains a default value definition and the default value
-        *
-        * @param array $featureIndex A feature index as produced by parseFieldDef()
-        * @return boolean
-        * @see t3lib_sqlparser::parseFieldDef()
-        */
-       public function checkEmptyDefaultValue($featureIndex) {
-               if (is_array($featureIndex['DEFAULT']['value'])) {
-                       if (!is_numeric($featureIndex['DEFAULT']['value'][0]) && empty($featureIndex['DEFAULT']['value'][0])) {
-                               return TRUE;
-                       } else {
-                               return FALSE;
-                       }
-               }
-               return TRUE;
-       }
-
-       /**
-        * Implodes an array of WHERE clause configuration into a WHERE clause.
-        *
-        * DBAL-specific: The only(!) handled "calc" operators supported by parseWhereClause() are:
-        * - the bitwise logical and (&)
-        * - the addition (+)
-        * - the substraction (-)
-        * - the multiplication (*)
-        * - the division (/)
-        * - the modulo (%)
-        *
-        * @param array WHERE clause configuration
-        * @return string WHERE clause as string.
-        * @see t3lib_sqlparser::parseWhereClause()
-        */
-       public function compileWhereClause($clauseArray, $functionMapping = TRUE) {
-               switch ((string)$GLOBALS['TYPO3_DB']->handlerCfg[$GLOBALS['TYPO3_DB']->lastHandlerKey]['type']) {
-                       case 'native':
-                               $output = parent::compileWhereClause($clauseArray);
-                               break;
-                       case 'adodb':
-                                       // Prepare buffer variable:
-                               $output = '';
-
-                                       // Traverse clause array:
-                               if (is_array($clauseArray)) {
-                                       foreach($clauseArray as $k => $v) {
-
-                                                       // Set operator:
-                                               $output .= $v['operator'] ? ' ' . $v['operator'] : '';
-
-                                                       // Look for sublevel:
-                                               if (is_array($v['sub'])) {
-                                                       $output .= ' (' . trim($this->compileWhereClause($v['sub'], $functionMapping)) . ')';
-                                               } else {
-
-                                                               // Set field/table with modifying prefix if any:
-                                                       $output .= ' ' . trim($v['modifier']) . ' ';
-
-                                                               // DBAL-specific: Set calculation, if any:
-                                                       if ($v['calc'] === '&' && $functionMapping) {
-                                                               switch(TRUE) {
-                                                                       case $GLOBALS['TYPO3_DB']->runningADOdbDriver('oci8'):
-                                                                                       // Oracle only knows BITAND(x,y) - sigh
-                                                                               $output .= 'BITAND(' . trim(($v['table'] ? $v['table'] . '.' : '') . $v['field']) . ',' . $v['calc_value'][1] . $this->compileAddslashes($v['calc_value'][0]) . $v['calc_value'][1] . ')';
-                                                                               break;
-                                                                       default:
-                                                                                       // MySQL, MS SQL Server, PostgreSQL support the &-syntax
-                                                                               $output .= trim(($v['table'] ? $v['table'] . '.' : '') . $v['field']) . $v['calc'] . $v['calc_value'][1] . $this->compileAddslashes($v['calc_value'][0]) . $v['calc_value'][1];
-                                                                               break;
-                                                               }
-                                                       } elseif ($v['calc']) {
-                                                               $output .= trim(($v['table'] ? $v['table'] . '.' : '') . $v['field']) . $v['calc'];
-                                                               if (isset($v['calc_table'])) {
-                                                                       $output .= trim(($v['calc_table'] ? $v['calc_table'] . '.' : '') . $v['calc_field']);
-                                                               } else {
-                                                                       $output .= $v['calc_value'][1] . $this->compileAddslashes($v['calc_value'][0]) . $v['calc_value'][1];
-                                                               }
-                                                       } elseif (!($GLOBALS['TYPO3_DB']->runningADOdbDriver('oci8') && preg_match('/(NOT )?LIKE/', $v['comparator']) && $functionMapping)) {
-                                                               $output .= trim(($v['table'] ? $v['table'] . '.' : '') . $v['field']);
-                                                       }
-
-                                                               // Set comparator:
-                                                       if ($v['comparator']) {
-                                                               switch (TRUE) {
-                                                                       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();
-                                                                                               foreach ($v['value']['args'] as $fieldDef) {
-                                                                                                       $values[] = ($fieldDef['table'] ? $fieldDef['table'] . '.' : '') . $fieldDef['field'];
-                                                                                               }
-                                                                                               $compareValue = ' ' . $v['value']['operator'] . '(' . implode(',', $values) . ')';
-                                                                                       } else {
-                                                                                               $compareValue = $v['value'][1] . $this->compileAddslashes(trim($v['value'][0], '%')) . $v['value'][1];
-                                                                                       }
-                                                                                       if (t3lib_div::isFirstPartOfStr($v['comparator'], 'NOT')) {
-                                                                                               $output .= 'NOT ';
-                                                                                       }
-                                                                                       $output .= '(dbms_lob.instr(' . trim(($v['table'] ? $v['table'] . '.' : '') . $v['field']) . ', ' . $compareValue . ',1,1) > 0)';
-                                                                               break;
-                                                                       default:
-                                                                               $output .= ' ' . $v['comparator'];
-
-                                                                                       // 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']) . ')';
-                                                                                       } else {
-                                                                                               $valueBuffer = array();
-                                                                                               foreach ($v['value'] as $realValue) {
-                                                                                                       $valueBuffer[] = $realValue[1] . $this->compileAddslashes($realValue[0]) . $realValue[1];
-                                                                                               }
-                                                                                               $output .= ' (' . trim(implode(',', $valueBuffer)) . ')';
-                                                                                       }
-                                                                               } else if (isset($v['value']['operator'])) {
-                                                                                       $values = array();
-                                                                                       foreach ($v['value']['args'] as $fieldDef) {
-                                                                                               $values[] = ($fieldDef['table'] ? $fieldDef['table'] . '.' : '') . $fieldDef['field'];
-                                                                                       }
-                                                                                       $output .= ' ' . $v['value']['operator'] . '(' . implode(',', $values) . ')';
-                                                                               } else {
-                                                                                       $output .= ' ' . $v['value'][1] . $this->compileAddslashes($v['value'][0]) . $v['value'][1];
-                                                                               }
-                                                                               break;
-                                                               }
-                                                       }
-                                               }
-                                       }
-                               }
-                               break;
-               }
-
-               return $output;
-       }
-}
-
-
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dbal/class.ux_t3lib_sqlparser.php']) {
-       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dbal/class.ux_t3lib_sqlparser.php']);
-}
-
-?>
\ No newline at end of file
diff --git a/typo3/sysext/dbal/doc/class.tslib_fe.php.diff b/typo3/sysext/dbal/doc/class.tslib_fe.php.diff
deleted file mode 100644 (file)
index 5a1739e..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-Index: typo3/sysext/cms/tslib/class.tslib_fe.php
-===================================================================
-RCS file: /cvsroot/typo3/TYPO3core/typo3/sysext/cms/tslib/class.tslib_fe.php,v
-retrieving revision 1.104.2.25
-diff -u -w -r1.104.2.25 class.tslib_fe.php
---- typo3/sysext/cms/tslib/class.tslib_fe.php  7 Jun 2006 10:02:10 -0000       1.104.2.25
-+++ typo3/sysext/cms/tslib/class.tslib_fe.php  27 Jun 2006 19:36:14 -0000
-@@ -1579,16 +1579,22 @@
-               $GLOBALS['TT']->push('Cache Query','');
-                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
--                              'S.*',
--                              'cache_pages S,pages P',
--                              'S.hash='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this->newHash, 'cache_pages').'
--                                      AND S.page_id=P.uid
--                                      AND S.expires > '.intval($GLOBALS['EXEC_TIME']).'
--                                      AND P.deleted=0
--                                      AND P.hidden=0
--                                      AND P.starttime<='.intval($GLOBALS['EXEC_TIME']).'
--                                      AND (P.endtime=0 OR P.endtime>'.intval($GLOBALS['EXEC_TIME']).')'
-+                                              '*',
-+                                              'cache_pages',
-+                                              'hash='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this->newHash, 'cache_pages').'
-+                                                      AND expires > '.intval($GLOBALS['EXEC_TIME'])
-                       );
-+              if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
-+                      $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
-+                                              'uid',
-+                                              'pages',
-+                                              'uid='.$row['page_id'].'
-+                                                      AND deleted=0
-+                                                      AND hidden=0
-+                                                      AND starttime<='.intval($GLOBALS['EXEC_TIME']).'
-+                                                      AND (endtime=0 OR endtime>'.intval($GLOBALS['EXEC_TIME']).')'
-+                                      );
-+              }
-               $GLOBALS['TT']->pull();
-               if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
diff --git a/typo3/sysext/dbal/doc/manual.sxw b/typo3/sysext/dbal/doc/manual.sxw
deleted file mode 100644 (file)
index 87fad90..0000000
Binary files a/typo3/sysext/dbal/doc/manual.sxw and /dev/null differ
diff --git a/typo3/sysext/dbal/ext_autoload.php b/typo3/sysext/dbal/ext_autoload.php
deleted file mode 100644 (file)
index 5006d6e..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-// DO NOT CHANGE THIS FILE! It is automatically generated by extdeveval::buildAutoloadRegistry.
-// This file was generated on 2009-10-26 22:04
-
-
-$extensionPath = t3lib_extMgm::extPath('dbal');
-return array(
-       'tx_dbal_sqlengine' => $extensionPath . 'lib/class.tx_dbal_sqlengine.php',
-       'ux_t3lib_sqlparser' => $extensionPath . 'class.ux_t3lib_sqlparser.php',
-);
-?>
diff --git a/typo3/sysext/dbal/ext_conf_template.txt b/typo3/sysext/dbal/ext_conf_template.txt
deleted file mode 100644 (file)
index 1403261..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-  # cat=basic; type=user[EXT:dbal/lib/class.tx_dbal_tsparserext.php:tx_dbal_tsparserext->displayMessage];
-Compatibility=
-
diff --git a/typo3/sysext/dbal/ext_emconf.php b/typo3/sysext/dbal/ext_emconf.php
deleted file mode 100644 (file)
index b776e37..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-
-########################################################################
-# Extension Manager/Repository config file for ext "dbal".
-#
-# Auto generated 28-09-2010 16:16
-#
-# Manual updates:
-# Only the data in the array - everything else is removed by next
-# writing. "version" and "dependencies" must not be touched!
-########################################################################
-
-$EM_CONF[$_EXTKEY] = array(
-       'title' => 'Database Abstraction Layer',
-       'description' => 'A database abstraction layer implementation for TYPO3 4.0 based on ADOdb and offering a lot of other features...',
-       'category' => 'be',
-       'shy' => 0,
-       'dependencies' => 'adodb',
-       'conflicts' => '',
-       'priority' => '',
-       'loadOrder' => '',
-       'module' => 'mod1',
-       'state' => 'stable',
-       'internal' => 0,
-       'uploadfolder' => 0,
-       'createDirs' => '',
-       'modify_tables' => '',
-       'clearCacheOnLoad' => 0,
-       'lockType' => '',
-       'author' => 'Xavier Perseguers',
-       'author_email' => 'typo3@perseguers.ch',
-       'author_company' => '',
-       'CGLcompliance' => '',
-       'CGLcompliance_note' => '',
-       'version' => '1.0.6',
-       '_md5_values_when_last_written' => 'a:35:{s:9:"ChangeLog";s:4:"b301";s:26:"class.ux_db_list_extra.php";s:4:"6b88";s:21:"class.ux_t3lib_db.php";s:4:"7e65";s:28:"class.ux_t3lib_sqlparser.php";s:4:"e922";s:16:"ext_autoload.php";s:4:"bd13";s:21:"ext_conf_template.txt";s:4:"f5cf";s:12:"ext_icon.gif";s:4:"c9ba";s:17:"ext_localconf.php";s:4:"b7ca";s:14:"ext_tables.php";s:4:"b187";s:14:"ext_tables.sql";s:4:"1f95";s:27:"doc/class.tslib_fe.php.diff";s:4:"0083";s:14:"doc/manual.sxw";s:4:"2102";s:45:"handlers/class.tx_dbal_handler_openoffice.php";s:4:"f1cc";s:43:"handlers/class.tx_dbal_handler_rawmysql.php";s:4:"d523";s:40:"handlers/class.tx_dbal_handler_xmldb.php";s:4:"e7bf";s:31:"lib/class.tx_dbal_sqlengine.php";s:4:"89a4";s:33:"lib/class.tx_dbal_tsparserext.php";s:4:"420b";s:14:"mod1/clear.gif";s:4:"cc11";s:13:"mod1/conf.php";s:4:"6e63";s:14:"mod1/index.php";s:4:"fd87";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: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:"5299";s:22:"tests/BaseTestCase.php";s:4:"6f20";s:26:"tests/FakeDbConnection.php";s:4:"8fb1";s:23:"tests/dbGeneralTest.php";s:4:"c74c";s:22:"tests/dbOracleTest.php";s:4:"a3ca";s:30:"tests/sqlParserGeneralTest.php";s:4:"f127";s:30:"tests/fixtures/oci8.config.php";s:4:"433e";}',
-       'constraints' => array(
-               'depends' => array(
-                       'adodb' => '5.10.0-',
-                       'php' => '5.2.0-0.0.0',
-                       'typo3' => '4.3.0-4.3.99',
-               ),
-               'conflicts' => array(
-               ),
-               'suggests' => array(
-               ),
-       ),
-       'suggests' => array(
-       ),
-);
-
-?>
\ No newline at end of file
diff --git a/typo3/sysext/dbal/ext_icon.gif b/typo3/sysext/dbal/ext_icon.gif
deleted file mode 100644 (file)
index 8b6190c..0000000
Binary files a/typo3/sysext/dbal/ext_icon.gif and /dev/null differ
diff --git a/typo3/sysext/dbal/ext_localconf.php b/typo3/sysext/dbal/ext_localconf.php
deleted file mode 100644 (file)
index 8ee482c..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php
-if (!defined('TYPO3_MODE')) {
-       die ('Access denied.');
-}
-
-$TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_db.php'] = t3lib_extMgm::extPath('dbal') . 'class.ux_t3lib_db.php';
-$TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_sqlparser.php'] = t3lib_extMgm::extPath('dbal') . 'class.ux_t3lib_sqlparser.php';
-$TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/class.db_list_extra.inc'] = t3lib_extMgm::extPath('dbal') . 'class.ux_db_list_extra.php';
-
-?>
diff --git a/typo3/sysext/dbal/ext_tables.php b/typo3/sysext/dbal/ext_tables.php
deleted file mode 100644 (file)
index 4f5438c..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-if (!defined('TYPO3_MODE')) {
-       die ('Access denied.');
-}
-
-if (TYPO3_MODE === 'BE') {
-       t3lib_extMgm::addModule('tools', 'txdbalM1', '', t3lib_extMgm::extPath($_EXTKEY) . 'mod1/');
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/dbal/ext_tables.sql b/typo3/sysext/dbal/ext_tables.sql
deleted file mode 100644 (file)
index 9428be0..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-
-#
-# Table structure for table 'tx_dbal_debuglog'
-#
-CREATE TABLE tx_dbal_debuglog (
-       uid int(11) unsigned NOT NULL auto_increment,
-       tstamp int(11) unsigned DEFAULT '0',
-       beuser_id int(11) unsigned DEFAULT '0',
-       script varchar(255) DEFAULT '' NOT NULL,
-       exec_time int(11) unsigned DEFAULT '0',
-       table_join varchar(255) DEFAULT '' NOT NULL,
-       serdata blob,
-       query text,
-       errorFlag int(11) unsigned DEFAULT '0',
-
-       PRIMARY KEY (uid),
-       KEY tstamp (tstamp)
-);
-
-#
-# Table structure for table 'tx_dbal_debuglog_where'
-#
-CREATE TABLE tx_dbal_debuglog_where (
-       uid int(11) unsigned NOT NULL auto_increment,
-       tstamp int(11) unsigned DEFAULT '0',
-       beuser_id int(11) unsigned DEFAULT '0',
-       script varchar(255) DEFAULT '' NOT NULL,
-       tablename varchar(255) DEFAULT '' NOT NULL,
-       whereclause text,
-
-       PRIMARY KEY (uid),
-       KEY tstamp (tstamp)
-);
diff --git a/typo3/sysext/dbal/handlers/class.tx_dbal_handler_openoffice.php b/typo3/sysext/dbal/handlers/class.tx_dbal_handler_openoffice.php
deleted file mode 100644 (file)
index 8a2bdab..0000000
+++ /dev/null
@@ -1,235 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2004-2009 Kasper Skaarhoj (kasper@typo3.com)
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-*
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*  A copy is found in the textfile GPL.txt and important notices to the license
-*  from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-/**
- * Contains an example DBAL handler class
- *
- * $Id: class.tx_dbal_handler_openoffice.php 35525 2010-07-11 14:05:40Z xperseguers $
- *
- * @author     Kasper Skaarhoj <kasper@typo3.com>
- */
-/**
- * [CLASS/FUNCTION INDEX of SCRIPT]
- *
- *
- *
- *   74: class tx_dbal_handler_xmldb extends tx_dbal_sqlengine
- *   91:     function init($config, &$pObj)
- *  128:     function readDataSource($table)
- *  157:     function saveDataSource($table)
- *  184:     function xmlDB_writeStructure()
- *  193:     function xmlDB_readStructure()
- *
- *              SECTION: SQL admin functions
- *  217:     function admin_get_tables()
- *  242:     function admin_get_fields($tableName)
- *  276:     function admin_get_keys($tableName)
- *  314:     function admin_query($query)
- *
- * TOTAL FUNCTIONS: 9
- * (This index is automatically created/updated by the extension "extdeveval")
- *
- */
-
-
-
-
-
-
-
-
-
-
-/**
- * Example DBAL handler class
- * Stores data in an Open Office Calc Spreadsheet
- *
- * @author     Kasper Skaarhoj <kasper@typo3.com>
- * @package TYPO3
- * @subpackage tx_dbal
- */
-class tx_dbal_handler_openoffice extends tx_dbal_sqlengine {
-
-       var $config = array();
-       var $pObj;      // Set from DBAL class.
-
-       var $spreadSheetFiles = '';
-       var $unzip;             // Object
-
-       /**
-        * Initialize handler
-        *
-        * @param       array           Configuration from DBAL
-        * @param       object          Parent object
-        * @return      boolean         True on success.
-        */
-       function init($config, $pObj) {
-               $this->config = $config['config'];
-
-               if (t3lib_extMgm::isLoaded('libunzipped'))      {
-
-                               // Include Unzip library:
-                       require_once(t3lib_extMgm::extPath('libunzipped').'class.tx_libunzipped.php');
-
-                               // Find database file:
-                       $sxc_file = t3lib_div::getFileAbsFileName($this->config['sxc_file']);
-                       if (@is_file($sxc_file))        {
-
-                               // Initialize Unzip object:
-                               $this->unzip = t3lib_div::makeInstance('tx_libunzipped');
-                               $this->spreadSheetFiles = $this->unzip->init($sxc_file);
-
-                               if (is_array($this->spreadSheetFiles))  {
-                                       return TRUE;
-                               } else $this->errorStatus = 'Spreadsheet could not be unzipped...?';
-                       } else $this->errorStatus = 'The Spreadsheet file "'.$sxc_file.'" was not found!';
-               } else $this->errorStatus = 'This data handler needs the extension "tx_libunzipped" to be installed!';
-
-               return FALSE;
-       }
-
-       /**
-        * Setting table data (overriding function)
-        *
-        * @param       string          Table name
-        * @return      void
-        */
-       function readDataSource($table) {
-               if (!is_array($this->spreadSheetFiles)) {
-                       die('Spreadsheet Data Source FATAL ERROR: No spreadsheet file loaded. Init() must have failed!');
-               }
-
-               $this->data[$table] = array();
-
-                               // Read content.xml:
-               $content_xml = $this->unzip->getFileFromArchive('content.xml');
-
-                       // Testing for writing back:
-               $content_xml = str_replace('Felt A1','FELT A1',$content_xml);
-
-                       // Writing file back (to database)
-               $this->unzip->putFileToArchive('content.xml', $content_xml['content']);
-
-                       // Writing ZIP content back to zip-archive file:
-               $result = $this->unzip->compileZipFile($GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir'] . 'dbtest_output.sxc');
-
-               debug($result);
-
-               exit;
-       }
-
-       /**
-        * Saving data source
-        *
-        * @param       string          Table name
-        * @return      boolean         True on success
-        */
-       function saveDataSource($table) {
-       }
-
-
-
-
-
-
-
-
-
-       /**************************************
-        *
-        * SQL admin functions
-        * (For use in the Install Tool and Extension Manager)
-        *
-        **************************************/
-
-       /**
-        * Returns the list of tables from the database
-        *
-        * @return      array           Tables in an array with tablename as key and an array with status information as value
-        */
-       function admin_get_tables()     {
-
-               $whichTables = array();
-               return $whichTables;
-       }
-
-       /**
-        * Returns information about each field in the $table
-        *
-        * @param       string          Table name
-        * @return      array           Field information in an associative array with fieldname => field row
-        */
-       function admin_get_fields($tableName)   {
-               return array();
-       }
-
-       /**
-        * Returns information about each index key in the $table
-        *
-        * @param       string          Table name
-        * @return      array           Key information in a numeric array
-        */
-       function admin_get_keys($tableName)     {
-               return array();
-       }
-
-       /**
-        * mysql() wrapper function, used by the Install Tool and EM for all queries regarding management of the database!
-        *
-        * @param       string          Query to execute
-        * @return      pointer         Result pointer
-        */
-       function admin_query($query)    {
-
-               $parsedQuery = $this->parseSQL($query);
-               $table = $parsedQuery['TABLE'];
-
-               if (is_array($parsedQuery))     {
-                               // Process query based on type:
-                       switch($parsedQuery['type'])    {
-                               case 'CREATETABLE':
-                               break;
-                               case 'ALTERTABLE':
-                               break;
-                               case 'DROPTABLE':
-                               break;
-                               default:
-                                       $this->errorStatus = 'Query type "'.$parsedQuery['type'].'" was not supported!';
-                               break;
-                       }
-
-               } else $this->errorStatus = 'SQL parse error: '.$parsedQuery;
-
-               return FALSE;
-       }
-}
-
-
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dbal/handlers/class.tx_dbal_handler_openoffice.php']) {
-       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dbal/handlers/class.tx_dbal_handler_openoffice.php']);
-}
-
-?>
\ No newline at end of file
diff --git a/typo3/sysext/dbal/handlers/class.tx_dbal_handler_rawmysql.php b/typo3/sysext/dbal/handlers/class.tx_dbal_handler_rawmysql.php
deleted file mode 100644 (file)
index f9e957b..0000000
+++ /dev/null
@@ -1,356 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2004-2009 Kasper Skaarhoj (kasper@typo3.com)
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-*
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*  A copy is found in the textfile GPL.txt and important notices to the license
-*  from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-/**
- * Contains an example DBAL handler class
- *
- * $Id: class.tx_dbal_handler_rawmysql.php 35525 2010-07-11 14:05:40Z xperseguers $
- *
- * @author     Kasper Skaarhoj <kasper@typo3.com>
- */
-/**
- * [CLASS/FUNCTION INDEX of SCRIPT]
- *
- *
- *
- *   86: class tx_dbal_handler_rawmysql extends tx_dbal_sqlengine
- *   99:     function init($config,&$pObj)
- *  123:     function exec_INSERTquery($table,$fields_values)
- *  135:     function exec_UPDATEquery($table,$where,$fields_values)
- *  146:     function exec_DELETEquery($table,$where)
- *  161:     function exec_SELECTquery($select_fields,$from_table,$where_clause,$groupBy,$orderBy,$limit)
- *  173:     function sql_error()
- *  182:     function sql_insert_id()
- *  191:     function sql_affected_rows()
- *  201:     function sql_query($query)
- *  213:     function quoteStr($str)
- *
- *              SECTION: SQL admin functions
- *  237:     function admin_get_tables()
- *  254:     function admin_get_fields($tableName)
- *  272:     function admin_get_keys($tableName)
- *  290:     function admin_query($query)
- *
- *
- *  308: class tx_dbal_handler_rawmysql_sqlObj extends tx_dbal_sqlengine_resultobj
- *  317:     function sql_num_rows()
- *  326:     function sql_fetch_assoc()
- *  335:     function sql_fetch_row()
- *  345:     function sql_data_seek($pointer)
- *
- * TOTAL FUNCTIONS: 18
- * (This index is automatically created/updated by the extension "extdeveval")
- *
- */
-
-
-
-
-
-
-
-
-
-
-/**
- * Example DBAL userdefined handler class
- * It simply makes pass-through of MySQL
- *
- * @author     Kasper Skaarhoj <kasper@typo3.com>
- * @package TYPO3
- * @subpackage tx_dbal
- */
-class tx_dbal_handler_rawmysql extends tx_dbal_sqlengine {
-
-       var $config = array();
-       var $link;
-       var $pObj;      // Set from DBAL class.
-
-       /**
-        * Initialize.
-        * For MySQL we will have to connect to the database and select the database.
-        *
-        * @param       array           Configuration array from handler
-        * @param       object          Parent object.
-        * @return      boolean         True if connection and database selection worked out well.
-        */
-       function init($config,&$pObj)   {
-               $this->config = $config['config'];
-               $this->pObj = $pObj;
-               $this->link = mysql_pconnect(
-                                                       $this->config['host'],
-                                                       $this->config['username'],
-                                                       $this->config['password']
-                                               );
-
-                       // Select database as well:
-               if (mysql_select_db($this->config['database'], $this->link))    {
-                       $output = TRUE;
-               }
-
-               return $output;
-       }
-
-       /**
-        * Execute INSERT query
-        *
-        * @param       string          Table name
-        * @param       array           Field=>Value array
-        * @return      boolean         True on success
-        */
-       function exec_INSERTquery($table,$fields_values)        {
-               return mysql_query($GLOBALS['TYPO3_DB']->INSERTquery($table,$fields_values), $this->link);
-       }
-
-       /**
-        * Execute UPDATE query
-        *
-        * @param       string          Table name
-        * @param       string          WHERE clause
-        * @param       array           Field=>Value array
-        * @return      boolean         True on success
-        */
-       function exec_UPDATEquery($table,$where,$fields_values) {
-               return mysql_query($GLOBALS['TYPO3_DB']->UPDATEquery($table,$where,$fields_values), $this->link);
-       }
-
-       /**
-        * Execute DELETE query
-        *
-        * @param       string          Table name
-        * @param       string          WHERE clause
-        * @return      boolean         True on success
-        */
-       function exec_DELETEquery($table,$where)        {
-               return mysql_query($GLOBALS['TYPO3_DB']->DELETEquery($table,$where), $this->link);
-       }
-
-       /**
-        * Execute SELECT query
-        *
-        * @param       string          List of fields to select from the table. This is what comes right after "SELECT ...". Required value.
-        * @param       string          Table(s) from which to select. This is what comes right after "FROM ...". Required value.
-        * @param       string          Optional additional WHERE clauses put in the end of the query. NOTICE: You must escape values with addslashes() first
-        * @param       string          Optional GROUP BY field(s), if none, supply blank string.
-        * @param       string          Optional ORDER BY field(s), if none, supply blank string.
-        * @param       string          Optional LIMIT value ([begin,]max), if none, supply blank string.
-        * @return      object          Result object
-        */
-       function exec_SELECTquery($select_fields,$from_table,$where_clause,$groupBy,$orderBy,$limit)    {
-               $res = t3lib_div::makeInstance('tx_dbal_handler_rawmysql_sqlObj');              // Create result object
-               $this->pObj->lastQuery = $GLOBALS['TYPO3_DB']->SELECTquery($select_fields,$from_table,$where_clause,$groupBy,$orderBy,$limit);
-               $res->result = mysql(TYPO3_db, $this->pObj->lastQuery, $this->link);    // Execute query
-               return $res;
-       }
-
-       /**
-        * mysql_error() wrapper
-        *
-        * @return      string          mysql_error()
-        */
-       function sql_error()    {
-               return mysql_error();
-       }
-
-       /**
-        * mysql_insert_id() wrapper
-        *
-        * @return      integer         mysql_insert_id();
-        */
-       function sql_insert_id()        {
-               return mysql_insert_id();
-       }
-
-       /**
-        * mysql_affected_rows() wrapper
-        *
-        * @return      integer         mysql_affected_rows()
-        */
-       function sql_affected_rows()    {
-               return mysql_affected_rows();
-       }
-
-       /**
-        * mysql_query() wrapper
-        *
-        * @param       string          Query string
-        * @return      object          Result object
-        */
-       function sql_query($query)      {
-               $res = t3lib_div::makeInstance('tx_dbal_handler_rawmysql_sqlObj');
-               $res->result = mysql_query($query, $this->link);
-               return $res;
-       }
-
-       /**
-        * Escape quotes in strings
-        *
-        * @param       string          Input string
-        * @return      string          Output string
-        */
-       function quoteStr($str) {
-               return addslashes($str);
-       }
-
-
-
-
-
-
-
-
-
-       /**************************************
-        *
-        * SQL admin functions
-        * (For use in the Install Tool and Extension Manager)
-        *
-        **************************************/
-
-       /**
-        * Returns the list of tables from the database, quering MySQL for it.
-        *
-        * @return      array           Tables in an array (tablename is in both key and value)
-        * @todo        Should return table details in value! see t3lib_db::admin_get_tables()
-        */
-       function admin_get_tables()     {
-               $whichTables = array();
-               $tables_result = mysql_list_tables($this->config['database'], $this->link);
-               if (!mysql_error())     {
-                       while ($theTable = mysql_fetch_assoc($tables_result)) {
-                               $whichTables[current($theTable)] = current($theTable);
-                       }
-               }
-               return $whichTables;
-       }
-
-       /**
-        * Returns information about each field in the $table, quering MySQL for it.
-        *
-        * @param       string          Table name
-        * @return      array           Field information in an associative array with fieldname => field row
-        */
-       function admin_get_fields($tableName)   {
-               $output = array();
-
-               if ($columns_res = @mysql_query('SHOW columns FROM '.$tableName, $this->link))  {
-                       while($fieldRow = mysql_fetch_assoc($columns_res))      {
-                               $output[$fieldRow["Field"]] = $fieldRow;
-                       }
-               }
-
-               return $output;
-       }
-
-       /**
-        * Returns information about each index key in the $table, quering MySQL for it.
-        *
-        * @param       string          Table name
-        * @return      array           Key information in a numeric array
-        */
-       function admin_get_keys($tableName)     {
-               $output = array();
-
-               if ($keyRes = @mysql_query('SHOW keys FROM '.$tableName, $this->link))  {
-                       while($keyRow = mysql_fetch_assoc($keyRes))     {
-                               $output[] = $keyRow;
-                       }
-               }
-
-               return $output;
-       }
-
-       /**
-        * mysql() wrapper function, used by the Install Tool and EM for all queries regarding management of the database!
-        *
-        * @param       string          Query to execute
-        * @return      pointer         Result pointer
-        */
-       function admin_query($query)    {
-               return $this->sql_query($query);
-       }
-}
-
-
-
-
-
-
-
-/**
- * Result object for this MySQL userdefined handler
- *
- * @author     Kasper Skaarhoj <kasper@typo3.com>
- * @package TYPO3
- * @subpackage tx_dbal
- */
-class tx_dbal_handler_rawmysql_sqlObj extends tx_dbal_sqlengine_resultobj {
-
-       var $result = '';                       // Not array here, but resource pointer.
-
-       /**
-        * mysql_num_rows() Wrapper
-        *
-        * @return      integer         mysql_num_rows()
-        */
-       function sql_num_rows() {
-               return mysql_num_rows($this->result);
-       }
-
-       /**
-        * mysql_fetch_assoc() Wrapper
-        *
-        * @return      array           mysql_fetch_assoc()
-        */
-       function sql_fetch_assoc()      {
-               return mysql_fetch_assoc($this->result);
-       }
-
-       /**
-        * mysql_fetch_row()    wrapper
-        *
-        * @return      array           mysql_fetch_row()
-        */
-       function sql_fetch_row()        {
-               return mysql_fetch_row($this->result);
-       }
-
-       /**
-        * mysql_data_seek() wrapper
-        *
-        * @param       integer         Pointer to go to.
-        * @return      boolean         mysql_data_seek()
-        */
-       function sql_data_seek($pointer)        {
-               return mysql_data_seek($this->result,$pointer);
-       }
-}
-
-
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dbal/handlers/class.tx_dbal_handler_rawmysql.php'])   {
-       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dbal/handlers/class.tx_dbal_handler_rawmysql.php']);
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/dbal/handlers/class.tx_dbal_handler_xmldb.php b/typo3/sysext/dbal/handlers/class.tx_dbal_handler_xmldb.php
deleted file mode 100644 (file)
index f5fb3bb..0000000
+++ /dev/null
@@ -1,425 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2004-2009 Kasper Skaarhoj (kasper@typo3.com)
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-*
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*  A copy is found in the textfile GPL.txt and important notices to the license
-*  from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-/**
- * Contains an example DBAL handler class
- *
- * $Id: class.tx_dbal_handler_xmldb.php 35525 2010-07-11 14:05:40Z xperseguers $
- *
- * @author     Kasper Skaarhoj <kasper@typo3.com>
- */
-/**
- * [CLASS/FUNCTION INDEX of SCRIPT]
- *
- *
- *
- *   74: class tx_dbal_handler_xmldb extends tx_dbal_sqlengine
- *   91:     function init($config, &$pObj)
- *  128:     function readDataSource($table)
- *  157:     function saveDataSource($table)
- *  184:     function xmlDB_writeStructure()
- *  193:     function xmlDB_readStructure()
- *
- *              SECTION: SQL admin functions
- *  217:     function admin_get_tables()
- *  242:     function admin_get_fields($tableName)
- *  276:     function admin_get_keys($tableName)
- *  314:     function admin_query($query)
- *
- * TOTAL FUNCTIONS: 9
- * (This index is automatically created/updated by the extension "extdeveval")
- *
- */
-
-
-
-
-
-
-
-
-
-
-/**
- * Example DBAL handler class
- * Stores data in XML, not a database.
- *
- * @author     Kasper Skaarhoj <kasper@typo3.com>
- * @package TYPO3
- * @subpackage tx_dbal
- */
-class tx_dbal_handler_xmldb extends tx_dbal_sqlengine {
-
-       var $config = array();
-       var $pObj;      // Set from DBAL class.
-
-       // Database Storage directory:
-       var $DBdir = '';
-       var $DBstructure = array(
-               'tables' => array()
-       );
-
-       /**
-        * Initialize handler
-        *
-        * @param       array           Configuration from DBAL
-        * @param       object          Parent object
-        * @return      void
-        */
-       function init($config, $pObj) {
-               $this->config = $config['config'];
-
-               $dbStorage = t3lib_div::getFileAbsFileName($this->config['DBstorageDir']);
-               if ($dbStorage && @is_dir($dbStorage) && ($dbStorage{strlen($dbStorage)-1} == '/')) {
-                       $this->DBdir = $dbStorage;
-
-                               // Read structure file:
-                       if (@is_file($this->DBdir.'_STRUCTURE.xml'))    {
-                               $this->xmlDB_readStructure();
-                               if (is_array($this->DBstructure))       {
-                                       return TRUE;
-                               } else {
-                                       $this->errorStatus = 'The database structure array could not be loaded correctly. "_STRUCTURE.xml" may be corrupt';
-                               }
-                       } else {
-                               $this->xmlDB_writeStructure();
-                               if (@is_file($this->DBdir.'_STRUCTURE.xml'))    {
-                                       return TRUE;
-                               } else {
-                                       $this->errorStatus = 'The database structure file could not be created in dir "'.$dbStorage.'"';
-                               }
-                       }
-
-
-               } else $this->errorStatus = 'The database storage dir "'.$dbStorage.'" did not exist!';
-
-debug($this->errorStatus,'XMLDB connect ERROR:');
-               return FALSE;
-       }
-
-       /**
-        * Setting table data (overriding function)
-        *
-        * @param       string          Table name
-        * @return      void
-        */
-       function readDataSource($table) {
-
-               if (!$this->DBdir)      {
-                       $this->errorStatus = 'XMLdatabase not connected';
-                       return FALSE;
-               }
-
-                       // Reading table:
-               if (is_array($this->DBstructure['tables'][$table]))     {
-                       if (!isset($this->data[$table]))        {       // Checking if it has already been read
-                               $newTableFile = 'TABLE_'.$table.'.xml';
-                               if (@is_file($this->DBdir.$newTableFile))       {
-                                       $this->data[$table] = t3lib_div::xml2array(t3lib_div::getUrl($this->DBdir.$newTableFile));
-                                       if (!is_array($this->data[$table]))             $this->data[$table] = array();
-                                       return TRUE;
-                               } else {
-                                       $this->data[$table] = array();
-                                       $this->errorStatus = 'Tablefile for "'.$table.'" not found';
-                               }
-                       }
-               } else $this->errorStatus = 'Table "'.$table.'" not found';
-       }
-
-       /**
-        * Saving data source
-        *
-        * @param       string          Table name
-        * @return      boolean         True on success
-        */
-       function saveDataSource($table) {
-
-               if (!$this->DBdir)      {
-                       $this->errorStatus = 'XMLdatabase not connected';
-                       return FALSE;
-               }
-
-                       // Writing table:
-               if (is_array($this->DBstructure['tables'][$table]))     {
-                       $newTableFile = 'TABLE_'.$table.'.xml';
-                       if (t3lib_div::getFileAbsFileName($this->DBdir.$newTableFile) && @is_file($this->DBdir.$newTableFile))  {
-
-                               $storeInCharset = $GLOBALS['LANG']->charSet;
-                               $xmlValue = t3lib_div::array2xml($this->data[$table],'',0,'T3xmlDB',0,array('useIndexTagForNum'=>'rec'));
-                               $content = '<?xml version="1.0" encoding="'.$storeInCharset.'" standalone="yes" ?>'.chr(10).$xmlValue;
-                               t3lib_div::writeFile($this->DBdir.$newTableFile,$content);
-
-                               return TRUE;
-                       } else $this->errorStatus = 'Tablefile for "'.$table.'" not found';
-               } else $this->errorStatus = 'Table "'.$table.'" not found';
-       }
-
-       /**
-        * Writing database structure
-        *
-        * @return      void
-        */
-       function xmlDB_writeStructure() {
-               t3lib_div::writeFile($this->DBdir.'_STRUCTURE.xml', t3lib_div::array2xml($this->DBstructure,'',0,'T3xmlDBStructure',0,array('useIndexTagForNum'=>'item')));
-       }
-
-       /**
-        * Reading database structure
-        *
-        * @return      void
-        */
-       function xmlDB_readStructure()  {
-               $this->DBstructure = t3lib_div::xml2array(t3lib_div::getUrl($this->DBdir.'_STRUCTURE.xml'));
-       }
-
-
-
-
-
-
-
-
-
-       /**************************************
-        *
-        * SQL admin functions
-        * (For use in the Install Tool and Extension Manager)
-        *
-        **************************************/
-
-       /**
-        * Returns the list of tables from the database
-        *
-        * @return      array           Tables in an array (tablename is in both key and value)
-        * @todo        Should return table details in value! see t3lib_db::admin_get_tables()
-        */
-       function admin_get_tables()     {
-
-               if (!$this->DBdir)      {
-                       $this->errorStatus = 'XMLdatabase not connected';
-                       return FALSE;
-               }
-
-               $whichTables = array();
-
-                       // Traverse tables:
-               if (is_array($this->DBstructure['tables']))     {
-                       foreach($this->DBstructure['tables'] as $tableName => $tableInfo)       {
-                               $whichTables[$tableName] = $tableName;
-                       }
-               }
-
-               return $whichTables;
-       }
-
-       /**
-        * Returns information about each field in the $table
-        *
-        * @param       string          Table name
-        * @return      array           Field information in an associative array with fieldname => field row
-        */
-       function admin_get_fields($tableName)   {
-
-               if (!$this->DBdir)      {
-                       $this->errorStatus = 'XMLdatabase not connected';
-                       return FALSE;
-               }
-
-               $output = array();
-
-                       // Traverse fields in table:
-               if (is_array($this->DBstructure['tables'][$tableName]) && is_array($this->DBstructure['tables'][$tableName]['FIELDS'])) {
-                       foreach($this->DBstructure['tables'][$tableName]['FIELDS'] as $fieldName => $fieldInfo) {
-                               $output[$fieldName] = array(
-                                       'Field' => $fieldName,
-                                       'Type' => $fieldInfo['definition']['fieldType'].
-                                                                       ($fieldInfo['definition']['value']?'('.$fieldInfo['definition']['value'].')':'').
-                                                                       (isset($fieldInfo['definition']['featureIndex']['UNSIGNED']) ? ' '.$fieldInfo['definition']['featureIndex']['UNSIGNED']['keyword'] : ''),
-                                       'Null' => isset($fieldInfo['definition']['featureIndex']['NOTNULL']) ? '' : 'Yes',
-                                       'Key' => '',
-                                       'Default' => $fieldInfo['definition']['featureIndex']['DEFAULT']['value'][0],
-                                       'Extra' => isset($fieldInfo['definition']['featureIndex']['AUTO_INCREMENT']) ? 'auto_increment' : '',
-                               );
-                       }
-               }
-
-               return $output;
-       }
-
-       /**
-        * Returns information about each index key in the $table
-        *
-        * @param       string          Table name
-        * @return      array           Key information in a numeric array
-        */
-       function admin_get_keys($tableName)     {
-
-               if (!$this->DBdir)      {
-                       $this->errorStatus = 'XMLdatabase not connected';
-                       return FALSE;
-               }
-
-               $output = array();
-
-                       // Traverse fields in table:
-               if (is_array($this->DBstructure['tables'][$tableName]) && is_array($this->DBstructure['tables'][$tableName]['KEYS']))   {
-                       foreach($this->DBstructure['tables'][$tableName]['KEYS'] as $keyName => $keyInfo)       {
-                               foreach($keyInfo as $seq => $keyField)  {
-                                       $output[] = array(
-                                               'Table' => $tableName,
-                                               'Non_unique' => ($keyName=='PRIMARYKEY' ? 0 : 1),
-                                               'Key_name' => ($keyName=='PRIMARYKEY' ? 'PRIMARY' : $keyName),
-                                               'Seq_in_index' => $seq+1,
-                                               'Column_name' => $keyField,
-                                               'Collation' => 'A',
-                                               'Cardinality' => '',
-                                               'Sub_part' => '',
-                                               'Packed' => '',
-                                               'Comment' => '',
-                                       );
-                               }
-                       }
-               }
-
-               return $output;
-       }
-
-       /**
-        * mysql() wrapper function, used by the Install Tool and EM for all queries regarding management of the database!
-        *
-        * @param       string          Query to execute
-        * @return      pointer         Result pointer
-        */
-       function admin_query($query)    {
-
-               if (!$this->DBdir)      {
-                       $this->errorStatus = 'XMLdatabase not connected';
-                       return FALSE;
-               }
-
-               $parsedQuery = $this->parseSQL($query);
-               $table = $parsedQuery['TABLE'];
-
-               if (is_array($parsedQuery))     {
-                               // Process query based on type:
-                       switch($parsedQuery['type'])    {
-                               case 'CREATETABLE':
-                                       if (!is_array($this->DBstructure['tables'][$table]))    {
-                                               $newTableFile = 'TABLE_'.$table.'.xml';
-                                               if (!@is_file($this->DBdir.$newTableFile))      {
-
-                                                               // Write table file:
-                                                       t3lib_div::writeFile($this->DBdir.$newTableFile, '');   // Create file
-                                                       if (@is_file($this->DBdir.$newTableFile))       {
-
-                                                                       // Set and write structure
-                                                               if (!is_array($this->DBstructure['tables']))    $this->DBstructure['tables']=array();
-                                                               $this->DBstructure['tables'][(string)$table] = $parsedQuery;    // I have some STRANGE behaviours with this variable - had to do this trick to make it work!
-
-                                                               $this->xmlDB_writeStructure();
-                                                               return TRUE;
-                                                       } else $this->errorStatus = 'Table file "'.$this->DBdir.$newTableFile.'" could not be created! Cannot create table!';
-                                               } else $this->errorStatus = 'Table file "'.$this->DBdir.$newTableFile.'" already exists! Cannot create table!';
-                                       } else $this->errorStatus = 'Table "'.$table.'" already exists!';
-                               break;
-                               case 'ALTERTABLE':
-                                       if (is_array($this->DBstructure['tables'][$table]))     {
-                                               switch($parsedQuery['action'])  {
-                                                       case 'ADD':
-                                                               if (!is_array($this->DBstructure['tables'][$table]['FIELDS'][$parsedQuery['FIELD']]))   {
-                                                                       $this->DBstructure['tables'][$table]['FIELDS'][$parsedQuery['FIELD']]['definition'] = $parsedQuery['definition'];       // Adding field in the end of list.
-                                                                       $this->xmlDB_writeStructure();
-                                                                       return TRUE;
-
-                                                                       // TODO: Should traverse all data an add that field in arrays!
-                                                               } else $this->errorStatus = 'Field "'.$parsedQuery['FIELD'].'" already exists!';
-                                                       break;
-                                                       case 'CHANGE':
-                                                               if (is_array($this->DBstructure['tables'][$table]['FIELDS']))   {
-                                                                       if (is_array($this->DBstructure['tables'][$table]['FIELDS'][$parsedQuery['FIELD']]))    {
-                                                                               $newFieldInfo = array();
-                                                                               foreach($this->DBstructure['tables'][$table]['FIELDS'] as $fieldName => $fieldDefinition)       {
-                                                                                       if (!strcmp($fieldName,$parsedQuery['FIELD']))  {
-
-                                                                                                       // New fieldname?
-                                                                                               if ($parsedQuery['newField'])   {
-                                                                                                       if (!is_array($this->DBstructure['tables'][$table]['FIELDS'][$parsedQuery['newField']]))        {
-                                                                                                               $fieldName = $parsedQuery['newField'];
-                                                                                                       } else {
-                                                                                                               $this->errorStatus = 'A field in the table was already named "'.$parsedQuery['newField'].'"';
-                                                                                                               return FALSE;
-                                                                                                       }
-                                                                                               }
-                                                                                                       // Set new field definition:
-                                                                                               $fieldDefinition['definition'] = $parsedQuery['definition'];
-                                                                                       }
-
-                                                                                               // Set the whole thing in new var:
-                                                                                       $newFieldInfo[$fieldName] = $fieldDefinition;
-                                                                               }
-                                                                               $this->DBstructure['tables'][$table]['FIELDS'] = $newFieldInfo;
-                                                                               $this->xmlDB_writeStructure();
-                                                                               return TRUE;
-
-                                                                               // TODO: Should traverse all data an remove that field in arrays!
-                                                                       } else $this->errorStatus = 'Field "'.$parsedQuery['FIELD'].'" does not exist!';
-                                                               } else $this->errorStatus = 'There are not fields in the table - strange!';
-                                                       break;
-                                                       case 'DROP':
-                                                               if (is_array($this->DBstructure['tables'][$table]['FIELDS'][$parsedQuery['FIELD']]))    {
-                                                                       unset($this->DBstructure['tables'][$table]['FIELDS'][$parsedQuery['FIELD']]);   // Removing it...
-                                                                       $this->xmlDB_writeStructure();
-                                                                       return TRUE;
-
-                                                                       // TODO: Should traverse all data an remove that field in arrays!
-                                                               } else $this->errorStatus = 'Field "'.$parsedQuery['FIELD'].'" does not exist!';
-                                                       break;
-                                               }
-                                       } else $this->errorStatus = 'Table "'.$table.'" does not exist!';
-                               break;
-                               case 'DROPTABLE':
-
-                                               // TODO:
-                                       debug($parsedQuery);
-
-
-                               break;
-                               default:
-                                       $this->errorStatus = 'Query type "'.$parsedQuery['type'].'" was not supported!';
-                               break;
-                       }
-
-               } else $this->errorStatus = 'SQL parse error: '.$parsedQuery;
-
-               return FALSE;
-       }
-}
-
-
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dbal/handlers/class.tx_dbal_handler_xmldb.php'])      {
-       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dbal/handlers/class.tx_dbal_handler_xmldb.php']);
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/dbal/last_synched_target b/typo3/sysext/dbal/last_synched_target
deleted file mode 100644 (file)
index ebf0236..0000000
+++ /dev/null
@@ -1 +0,0 @@
-https://svn.typo3.org/TYPO3v4/Extensions/dbal/tags/1.0.6/
diff --git a/typo3/sysext/dbal/lib/class.tx_dbal_sqlengine.php b/typo3/sysext/dbal/lib/class.tx_dbal_sqlengine.php
deleted file mode 100644 (file)
index