diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-09-16 15:44:21 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-09-16 15:44:21 +0200 |
commit | ca35d86c5a85485a418916ebf236b575d4401136 (patch) | |
tree | bfaa4dc524657cae5b3d5b1c8e27b3ac381ba7cd | |
parent | 1771bfc2f2c790bc5d7a439095290cb4c97edf1a (diff) | |
download | nextcloud-server-ca35d86c5a85485a418916ebf236b575d4401136.tar.gz nextcloud-server-ca35d86c5a85485a418916ebf236b575d4401136.zip |
adding ILIKE to AdapterSQLSrv
-rw-r--r-- | lib/private/db/adaptersqlsrv.php | 1 | ||||
-rw-r--r-- | tests/lib/db.php | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/private/db/adaptersqlsrv.php b/lib/private/db/adaptersqlsrv.php index a6bc0e21052..1ac9badab94 100644 --- a/lib/private/db/adaptersqlsrv.php +++ b/lib/private/db/adaptersqlsrv.php @@ -11,6 +11,7 @@ namespace OC\DB; class AdapterSQLSrv extends Adapter { public function fixupStatement($statement) { + $statement = str_replace(' ILIKE ', ' COLLATE Latin1_General_CI_AS LIKE ', $statement); $statement = preg_replace( "/\`(.*?)`/", "[$1]", $statement ); $statement = str_ireplace( 'NOW()', 'CURRENT_TIMESTAMP', $statement ); $statement = str_replace( 'LENGTH(', 'LEN(', $statement ); diff --git a/tests/lib/db.php b/tests/lib/db.php index 893d42cdbe9..22792930f0a 100644 --- a/tests/lib/db.php +++ b/tests/lib/db.php @@ -27,6 +27,11 @@ class Test_DB extends PHPUnit_Framework_TestCase { */ private $table3; + /** + * @var string + */ + private $table4; + public function setUp() { $dbfile = OC::$SERVERROOT.'/tests/data/db_structure.xml'; |