]> source.dussan.org Git - nextcloud-server.git/commitdiff
Make sure we don't quote column names twice
authorJoas Schilling <nickvergessen@owncloud.com>
Tue, 23 Feb 2016 07:50:52 +0000 (08:50 +0100)
committerJoas Schilling <nickvergessen@owncloud.com>
Tue, 23 Feb 2016 07:50:52 +0000 (08:50 +0100)
lib/private/db/querybuilder/expressionbuilder/mysqlexpressionbuilder.php
lib/private/db/querybuilder/expressionbuilder/ociexpressionbuilder.php
lib/private/db/querybuilder/expressionbuilder/pgsqlexpressionbuilder.php

index df5f1a4b701db94891bb09b0afe10019ac127262..8164d9623b8b6a5912087cac01de6d992796630b 100644 (file)
@@ -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);
        }
 
 }
index a508ba140b5c85cdc6b577ba251d6d10eb4b07ba..bd7daa23911538a2863a935e2b181ec8c10fad7c 100644 (file)
@@ -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\')');
        }
 }
index fecfaeb698f9e3b6f0f216b03a04a7a3f54ef7c5..ac2d7bf24215db5ced50e4502e8eb3ca17f99c23 100644 (file)
@@ -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);
        }
 
 }