From 8754ea6c8a61d10f0972bf91cc2314be28016671 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 23 Feb 2016 08:50:52 +0100 Subject: [PATCH] Make sure we don't quote column names twice --- .../querybuilder/expressionbuilder/mysqlexpressionbuilder.php | 2 +- .../db/querybuilder/expressionbuilder/ociexpressionbuilder.php | 2 +- .../querybuilder/expressionbuilder/pgsqlexpressionbuilder.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/private/db/querybuilder/expressionbuilder/mysqlexpressionbuilder.php b/lib/private/db/querybuilder/expressionbuilder/mysqlexpressionbuilder.php index df5f1a4b701..8164d9623b8 100644 --- a/lib/private/db/querybuilder/expressionbuilder/mysqlexpressionbuilder.php +++ b/lib/private/db/querybuilder/expressionbuilder/mysqlexpressionbuilder.php @@ -33,7 +33,7 @@ class MySqlExpressionBuilder extends ExpressionBuilder { public function iLike($x, $y, $type = null) { $x = $this->helper->quoteColumnName($x); $y = $this->helper->quoteColumnName($y); - return $this->comparison($x, ' COLLATE utf8_general_ci LIKE', $y); + return $this->expressionBuilder->comparison($x, ' COLLATE utf8_general_ci LIKE', $y); } } diff --git a/lib/private/db/querybuilder/expressionbuilder/ociexpressionbuilder.php b/lib/private/db/querybuilder/expressionbuilder/ociexpressionbuilder.php index a508ba140b5..bd7daa23911 100644 --- a/lib/private/db/querybuilder/expressionbuilder/ociexpressionbuilder.php +++ b/lib/private/db/querybuilder/expressionbuilder/ociexpressionbuilder.php @@ -156,6 +156,6 @@ class OCIExpressionBuilder extends ExpressionBuilder { public function iLike($x, $y, $type = null) { $x = $this->helper->quoteColumnName($x); $y = $this->helper->quoteColumnName($y); - return 'REGEXP_LIKE(`'.$x.'`, \'^\' || REPLACE('.$y.', \'%\', \'.*\') || \'$\', \'i\')'; + return new QueryFunction('REGEXP_LIKE('.$x.', \'^\' || REPLACE('.$y.', \'%\', \'.*\') || \'$\', \'i\')'); } } diff --git a/lib/private/db/querybuilder/expressionbuilder/pgsqlexpressionbuilder.php b/lib/private/db/querybuilder/expressionbuilder/pgsqlexpressionbuilder.php index fecfaeb698f..ac2d7bf2421 100644 --- a/lib/private/db/querybuilder/expressionbuilder/pgsqlexpressionbuilder.php +++ b/lib/private/db/querybuilder/expressionbuilder/pgsqlexpressionbuilder.php @@ -49,7 +49,7 @@ class PgSqlExpressionBuilder extends ExpressionBuilder { public function iLike($x, $y, $type = null) { $x = $this->helper->quoteColumnName($x); $y = $this->helper->quoteColumnName($y); - return $this->comparison($x, 'ILIKE', $y); + return $this->expressionBuilder->comparison($x, 'ILIKE', $y); } } -- 2.39.5