Link to maintainership/funding post
[grauphel.git] / lib / notestorage.php
index 2ae9fcb405702a9728f63488b268fe5933ae56c2..b430331d67d11a134b971f22697d37b954ebb3ab 100644 (file)
@@ -120,6 +120,11 @@ class NoteStorage
             $note->{'last-metadata-change-date'} = date('c');
         }
 
+        if (!isset($note->{'create-date'})) {
+            //no idea how to get the microseconds in there
+            $note->{'create-date'} = date('c');
+        }
+
         if (isset($noteUpdate->{'node-content'})
             && $note->{'note-content-version'} == 0
         ) {
@@ -293,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
         );
@@ -541,4 +546,4 @@ class NoteStorage
         );
     }
 }
-?>
\ No newline at end of file
+?>