use ILIKE for case insensitive searches
[grauphel.git] / lib / notestorage.php
index 621d12062979c35ed2e193b82903d47f6f853a7b..93311e4a4b877f6eadf431e03921c6d90a361f5a 100644 (file)
@@ -287,8 +287,8 @@ class NoteStorage
             $keywordGroups['NOT'] = array();
         }
 
-        $sqlTplAnd = ' AND (note_title LIKE ? OR note_tags LIKE ? OR note_content LIKE ?)';
-        $sqlTplNot = ' AND NOT (note_title LIKE ? OR note_tags LIKE ? OR note_content LIKE ?)';
+        $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
         );
@@ -432,7 +432,14 @@ class NoteStorage
                             )
                         )
                     ),
-                    'href' => null,//FIXME
+                    'href' => $this->urlGen->getAbsoluteURL(
+                        $this->urlGen->linkToRoute(
+                            'grauphel.gui.note',
+                            array(
+                                'guid' => $row['note_guid']
+                            )
+                        )
+                    ),
                 ),
                 'title' => $row['note_title'],
             );