Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore Combined Index View #31

Open
askvortsov1 opened this issue Feb 12, 2021 · 0 comments
Open

Restore Combined Index View #31

askvortsov1 opened this issue Feb 12, 2021 · 0 comments

Comments

@askvortsov1
Copy link
Contributor

I was thinking back to the combined index view issue (reverted in 72d06ba), and I think there might be a solution: we could run it through visibility scoping. This was much more confusing before with events, but now, all we need is an EloquentBuilder instance for Flarum\Discussion\Discussion. Unfortunately the query available under $search->getQuery() is a QueryBuilder, but we can wrap it in an EloquentBuilder to get access: core does a similar thing in https://github.com/flarum/core/blob/master/src/Post/Access/ScopePostVisibility.php#L55.

It would probably be a fair bit slower since visibility scoping is applied twice, but it should make it possible to restore combined view functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant