mirror of
https://github.com/flarum/core.git
synced 2025-08-06 08:27:42 +02:00
perf: Temporary quick fix for tags state performance (#3117)
This commit is contained in:
@@ -125,6 +125,17 @@ class ListDiscussionsController extends AbstractListController
|
||||
|
||||
$results = $results->getResults();
|
||||
|
||||
/*
|
||||
* @TODO replace in 1.2 with proper implementation!!!
|
||||
*/
|
||||
if (in_array('tags.state', $include, true)) {
|
||||
$results->load([
|
||||
'tags.state' => function ($query) use ($actor) {
|
||||
$query->where('user_id', $actor->id);
|
||||
}
|
||||
]);
|
||||
}
|
||||
|
||||
$this->loadRelations($results, $include);
|
||||
|
||||
if ($relations = array_intersect($include, ['firstPost', 'lastPost', 'mostRelevantPost'])) {
|
||||
|
Reference in New Issue
Block a user