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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->db->insert('check-full-text-search', ['pid' => getmypid(), 'searchtext' => $searchtext], Database::INSERT_UPDATE);
|
return $this->db->select('check-full-text-search', [], ["`pid` = ? AND MATCH (`searchtext`) AGAINST (? IN BOOLEAN MODE)", getmypid(), $this->escapeKeywords($searchtext)]) !== false;
|
||||||
$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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue