Project

General

Profile

Bug #22057 ยป 13422.diff

Administrator Admin, 2010-02-05 09:25

View differences:

class.ux_t3lib_db.php (working copy)
*/
protected function _quoteFieldNames(array $select_fields) {
foreach ($select_fields as $k => $v) {
if ($select_fields[$k]['field'] != '' && $select_fields[$k]['field'] != '*') {
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'] != '') {
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'] != '') {
tests/db_oracle_testcase.php (working copy)
$this->assertEquals($expected, $query);
}
/**
* @test
* http://bugs.typo3.org/view.php?id=13422
*/
public function numericColumnsAreNotQuoted() {
$query = $this->cleanSql($GLOBALS['TYPO3_DB']->SELECTquery(
'1',
'be_users',
'username = \'_cli_scheduler\' AND admin = 0 AND be_users.deleted = 0'
));
$expected = 'SELECT 1 FROM "be_users" WHERE "username" = \'_cli_scheduler\' AND "admin" = 0 AND "be_users"."deleted" = 0';
$this->assertEquals($expected, $query);
}
///////////////////////////////////////
// Tests concerning remapping
///////////////////////////////////////
    (1-1/1)