mirror of
https://github.com/friendica/friendica
synced 2025-04-29 09:44:23 +02:00
Special search keywords added
This commit is contained in:
parent
c66e841c38
commit
a8a9f93e09
5 changed files with 62 additions and 7 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue