aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-09-17 13:47:55 +0200
committerRobin Appelman <icewind@owncloud.com>2014-09-17 13:47:55 +0200
commit67b1ec1fafaa4ca4d4343b7a3867d194509cb633 (patch)
tree5fdedc354e5f3bb8bfc2b2c34e5bd47e2c4da5c1 /lib
parent60587e9dcda4e4c9d7a04c201024124964008f36 (diff)
downloadnextcloud-server-67b1ec1fafaa4ca4d4343b7a3867d194509cb633.tar.gz
nextcloud-server-67b1ec1fafaa4ca4d4343b7a3867d194509cb633.zip
Implement ILIKE for sqlite
Diffstat (limited to 'lib')
-rw-r--r--lib/private/db/adaptersqlite.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/db/adaptersqlite.php b/lib/private/db/adaptersqlite.php
index 06cdb7aab05..3471fcf4042 100644
--- a/lib/private/db/adaptersqlite.php
+++ b/lib/private/db/adaptersqlite.php
@@ -11,7 +11,7 @@ namespace OC\DB;
class AdapterSqlite extends Adapter {
public function fixupStatement($statement) {
- $statement = str_replace(' ILIKE ', ' LIKE ', $statement);
+ $statement = preg_replace('/`(\w+)` ILIKE \?/', 'LOWER($1) LIKE LOWER(?)', $statement);
$statement = str_replace( '`', '"', $statement );
$statement = str_ireplace( 'NOW()', 'datetime(\'now\')', $statement );
$statement = str_ireplace( 'UNIX_TIMESTAMP()', 'strftime(\'%s\',\'now\')', $statement );