mirror of
https://github.com/flarum/framework.git
synced 2025-04-25 14:14:03 +08:00
Fix following discussion list filter
This commit is contained in:
parent
d6fe156e89
commit
bb8232297f
@ -19,8 +19,8 @@ export default function addSubscriptionControls() {
|
||||
});
|
||||
|
||||
extend(DiscussionList.prototype, 'requestParams', function(params) {
|
||||
if (params.filter === 'following') {
|
||||
params.q = (params.q || '') + ' is:following';
|
||||
if (this.props.params.filter === 'following') {
|
||||
params.filter.q = (params.filter.q || '') + ' is:following';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ class SubscriptionGambit extends RegexGambit
|
||||
// might be better as `id IN (subquery)`?
|
||||
$method = $negate ? 'whereNotExists' : 'whereExists';
|
||||
$search->getQuery()->$method(function ($query) use ($actor, $matches) {
|
||||
$query->select(app('db')->raw(1))
|
||||
$query->select(app('flarum.db')->raw(1))
|
||||
->from('users_discussions')
|
||||
->whereRaw('discussion_id = discussions.id')
|
||||
->where('user_id', $actor->id)
|
||||
|
Loading…
x
Reference in New Issue
Block a user