]> source.dussan.org Git - nextcloud-server.git/commitdiff
adding ILIKE to AdapterSQLSrv
authorThomas Müller <thomas.mueller@tmit.eu>
Tue, 16 Sep 2014 13:44:21 +0000 (15:44 +0200)
committerThomas Müller <thomas.mueller@tmit.eu>
Tue, 16 Sep 2014 13:44:21 +0000 (15:44 +0200)
lib/private/db/adaptersqlsrv.php
tests/lib/db.php

index a6bc0e21052f67f8cedf6d6692b964df57318101..1ac9badab9406edc172cc051f59f8cd08dcb8678 100644 (file)
@@ -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 );
index 893d42cdbe962ad9c6c7ff30273bf38de8681eae..22792930f0a3a1ed80d45e281e04b865fa488c6f 100644 (file)
@@ -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';