diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-09-17 13:47:55 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-09-17 13:47:55 +0200 |
commit | 67b1ec1fafaa4ca4d4343b7a3867d194509cb633 (patch) | |
tree | 5fdedc354e5f3bb8bfc2b2c34e5bd47e2c4da5c1 /lib | |
parent | 60587e9dcda4e4c9d7a04c201024124964008f36 (diff) | |
download | nextcloud-server-67b1ec1fafaa4ca4d4343b7a3867d194509cb633.tar.gz nextcloud-server-67b1ec1fafaa4ca4d4343b7a3867d194509cb633.zip |
Implement ILIKE for sqlite
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/db/adaptersqlite.php | 2 |
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 ); |