mirror of
https://github.com/friendica/friendica
synced 2024-12-23 04:00:15 +00:00
Simplify SQL check
This commit is contained in:
parent
cc0b16c0ae
commit
62975b0ef2
1 changed files with 1 additions and 4 deletions
|
@ -156,10 +156,7 @@ class UserDefinedChannel extends \Friendica\BaseRepository
|
|||
return true;
|
||||
}
|
||||
|
||||
$this->db->insert('check-full-text-search', ['pid' => getmypid(), 'searchtext' => $searchtext], Database::INSERT_UPDATE);
|
||||
$result = $this->db->select('check-full-text-search', [], ["`pid` = ? AND MATCH (`searchtext`) AGAINST (? IN BOOLEAN MODE)", getmypid(), $this->escapeKeywords($searchtext)]);
|
||||
$this->db->delete('check-full-text-search', ['pid' => getmypid()]);
|
||||
return $result !== false;
|
||||
return $this->db->select('check-full-text-search', [], ["`pid` = ? AND MATCH (`searchtext`) AGAINST (? IN BOOLEAN MODE)", getmypid(), $this->escapeKeywords($searchtext)]) !== false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue