]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix iLike() falsely turning escaped % and _ into wildcards 23943/head
authorJoas Schilling <coding@schilljs.com>
Fri, 6 Nov 2020 14:31:28 +0000 (15:31 +0100)
committerJoas Schilling <coding@schilljs.com>
Fri, 6 Nov 2020 15:22:13 +0000 (16:22 +0100)
Signed-off-by: Joas Schilling <coding@schilljs.com>
lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php

index e8e436ba5bd2cdfa8da3d8671481ca7cf3f7bebb..f41242fdc6077097a0bf065400a72db5846bfd5c 100644 (file)
@@ -189,8 +189,6 @@ class OCIExpressionBuilder extends ExpressionBuilder {
         * @inheritdoc
         */
        public function iLike($x, $y, $type = null) {
-               $x = $this->helper->quoteColumnName($x);
-               $y = $this->helper->quoteColumnName($y);
-               return new QueryFunction('REGEXP_LIKE(' . $x . ', \'^\' || REPLACE(REPLACE(' . $y . ', \'%\', \'.*\'), \'_\', \'.\') || \'$\', \'i\')');
+               return $this->like($this->functionBuilder->lower($x), $this->functionBuilder->lower($y));
        }
 }