diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-05-28 16:16:59 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-11-20 14:42:06 +0100 |
commit | 2993a741cfe67c20280e87bc5b4056b30a82feba (patch) | |
tree | 2935b9884d620e70d6aefe535369e2232b4f3719 /lib | |
parent | ded50e8dbe0f519ba9b16016c3be9f15422f33b1 (diff) | |
download | nextcloud-server-2993a741cfe67c20280e87bc5b4056b30a82feba.tar.gz nextcloud-server-2993a741cfe67c20280e87bc5b4056b30a82feba.zip |
define escape character for like statements on sqlite
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/db/adaptersqlite.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/private/db/adaptersqlite.php b/lib/private/db/adaptersqlite.php index a9106967333..cc0e9e89ff8 100644 --- a/lib/private/db/adaptersqlite.php +++ b/lib/private/db/adaptersqlite.php @@ -11,6 +11,7 @@ namespace OC\DB; class AdapterSqlite extends Adapter { public function fixupStatement($statement) { + $statement = preg_replace('( I?LIKE \?)', '$0 ESCAPE \'\\\'', $statement); $statement = preg_replace('/`(\w+)` ILIKE \?/', 'LOWER($1) LIKE LOWER(?)', $statement); $statement = str_replace( '`', '"', $statement ); $statement = str_ireplace( 'NOW()', 'datetime(\'now\')', $statement ); |