Fix search on SQLite database on Nextcloud 19
authorChristian Weiske <[email protected]>
Sun, 17 Jan 2021 14:31:54 +0000 (15:31 +0100)
committerChristian Weiske <[email protected]>
Sun, 17 Jan 2021 16:03:06 +0000 (17:03 +0100)
May have been broken some time already.

lib/notestorage.php

index 275374c4ed7f36348cb11c7328cad93fdb1994eb..b430331d67d11a134b971f22697d37b954ebb3ab 100644 (file)
@@ -298,8 +298,8 @@ class NoteStorage
             $keywordGroups['NOT'] = array();
         }
 
-        $sqlTplAnd = ' AND (note_title ILIKE ? OR note_tags ILIKE ? OR note_content ILIKE ?)';
-        $sqlTplNot = ' AND NOT (note_title ILIKE ? OR note_tags ILIKE ? OR note_content ILIKE ?)';
+        $sqlTplAnd = ' AND (`note_title` ILIKE ? OR `note_tags` ILIKE ? OR `note_content` ILIKE ?)';
+        $sqlTplNot = ' AND NOT (`note_title` ILIKE ? OR `note_tags` ILIKE ? OR `note_content` ILIKE ?)';
         $arData = array(
             $this->username
         );
@@ -546,4 +546,4 @@ class NoteStorage
         );
     }
 }
-?>
\ No newline at end of file
+?>