[Pkg-owncloud-commits] [owncloud] 50/69: define escape character for like statements on sqlite
David Prévot
taffit at moszumanska.debian.org
Wed Nov 11 02:04:11 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch stable8
in repository owncloud.
commit 6b53de48dc587988dca75555cdf221b2a3a0705a
Author: Robin Appelman <icewind at owncloud.com>
Date: Thu May 28 16:16:59 2015 +0200
define escape character for like statements on sqlite
---
lib/private/db/adaptersqlite.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/private/db/adaptersqlite.php b/lib/private/db/adaptersqlite.php
index 5add058..e133a20 100644
--- a/lib/private/db/adaptersqlite.php
+++ b/lib/private/db/adaptersqlite.php
@@ -28,6 +28,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 );
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list