From bb30b876ae3efffa00e7e5ea6102de136af12c98 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 24 Jul 2017 11:39:53 +0200 Subject: [PATCH] Fix ILIKE regex for oracle Signed-off-by: Joas Schilling --- .../DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php b/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php index 179ce72e8e1..dc5c8bccbca 100644 --- a/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php +++ b/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php @@ -166,6 +166,6 @@ class OCIExpressionBuilder extends ExpressionBuilder { public function iLike($x, $y, $type = null) { $x = $this->helper->quoteColumnName($x); $y = $this->helper->quoteColumnName($y); - return new QueryFunction('REGEXP_LIKE('.$x.', \'^\' || REPLACE('.$y.', \'%\', \'.*\') || \'$\', \'i\')'); + return new QueryFunction('REGEXP_LIKE(' . $x . ', \'^\' || REPLACE(REPLACE(' . $y . ', \'%\', \'.*\'), \'_\', \'.\') || \'$\', \'i\')'); } } -- 2.39.5