- while ($row = $result->fetchRow()) {
- if ($since !== null && $row['note_last_sync_revision'] <= $since) {
- continue;
- }
- if ($rawtag !== null && strpos($row['note_tags'], $jsRawtag) === false) {
- continue;
- }
+ if ($rawtag !== null) {
+ $sqlData[] = '%' . $jsRawtag . '%';
+ $sql .= ' AND note_tags LIKE ?';
+ }
+
+ $result = $this->db->executeQuery($sql, $sqlData);
+ $notes = array();
+ while ($row = $result->fetch()) {