Special search keywords added

This commit is contained in:
Michael 2023-09-22 10:28:00 +00:00
parent c66e841c38
commit a8a9f93e09
5 changed files with 62 additions and 7 deletions

View file

@ -376,7 +376,11 @@ class Timeline extends BaseModule
$condition = [];
if (!empty($channel->fullTextSearch)) {
$condition = DBA::mergeConditions($condition, ["MATCH (`searchtext`) AGAINST (? IN BOOLEAN MODE)", $channel->fullTextSearch]);
$search = $channel->fullTextSearch;
foreach (['from', 'to', 'group', 'tag', 'network', 'visibility'] as $keyword) {
$search = preg_replace('~(' . $keyword . ':.[\w@\.-]+)~', '"$1"', $search);
}
$condition = DBA::mergeConditions($condition, ["MATCH (`searchtext`) AGAINST (? IN BOOLEAN MODE)", $search]);
}
if (!empty($channel->includeTags)) {