mirror of
https://github.com/flarum/framework.git
synced 2024-11-30 21:44:12 +08:00
Fix search with database prefix
wrap() only adds a table prefix when referencing a column with a table name (such as `foo.bar`) - when only a single identifier is provided, it is assumed to be a column name, which does not need a prefix. Fixes #1659.
This commit is contained in:
parent
f591585d02
commit
7705a2b7d7
|
@ -53,7 +53,7 @@ class FulltextGambit implements GambitInterface
|
|||
$query
|
||||
->addSelect('posts_ft.most_relevant_post_id')
|
||||
->join(
|
||||
new Expression('('.$subquery->toSql().') '.$grammar->wrap('posts_ft')),
|
||||
new Expression('('.$subquery->toSql().') '.$grammar->wrapTable('posts_ft')),
|
||||
'posts_ft.discussion_id', '=', 'discussions.id'
|
||||
)
|
||||
->addBinding($subquery->getBindings(), 'join')
|
||||
|
|
Loading…
Reference in New Issue
Block a user