Project

General

Profile

Feature #24145 » 16491_dbal.diff

Administrator Admin, 2010-11-23 11:34

View differences:

class.ux_t3lib_db.php (working copy)
* @return pointer Result pointer / DBAL object
*/
public function sql_query($query) {
$globalConfig = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['dbal']);
if ($globalConfig['sql_query.passthrough']) {
return parent::sql_query($query);
}
// This method is heavily used by Extbase, try to handle it with DBAL-native methods
$queryParts = $this->SQLparser->parseSQL($query);
if (is_array($queryParts) && t3lib_div::inList('SELECT,UPDATE,INSERT,DELETE', $queryParts['type'])) {
ext_conf_template.txt (working copy)
# cat=basic; type=boolean; label=Enable MySQL pass-through: Method $GLOBALS['TYPO3_DB']->sql_query() is only experimentally supported by DBAL. Its use should be avoided. When active, this flag tells DBAL to not try to parse the query and always send it as-this to MySQL, thus as if DBAL was not loaded.
sql_query.passthrough=1
# cat=basic; type=user[EXT:dbal/lib/class.tx_dbal_tsparserext.php:tx_dbal_tsparserext->displayMessage];
Compatibility=
(2-2/2)