16491_dbal.diff

Administrator Admin, 2010-11-23 11:34

Download (1.35 KB)

View differences:

class.ux_t3lib_db.php (working copy)
2479 2479
	 * @return	pointer		Result pointer / DBAL object
2480 2480
	 */
2481 2481
	public function sql_query($query) {
2482
		$globalConfig = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['dbal']);
2483
		if ($globalConfig['sql_query.passthrough']) {
2484
			return parent::sql_query($query);
2485
		}
2486

  
2482 2487
			// This method is heavily used by Extbase, try to handle it with DBAL-native methods
2483 2488
		$queryParts = $this->SQLparser->parseSQL($query);
2484 2489
		if (is_array($queryParts) && t3lib_div::inList('SELECT,UPDATE,INSERT,DELETE', $queryParts['type'])) {
ext_conf_template.txt (working copy)
1
  # 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.
2
sql_query.passthrough=1
3

  
1 4
  # cat=basic; type=user[EXT:dbal/lib/class.tx_dbal_tsparserext.php:tx_dbal_tsparserext->displayMessage];
2 5
Compatibility=
3 6