mirror of
https://github.com/BookStackApp/BookStack.git
synced 2026-05-04 18:08:46 +03:00
Search: Tested changes to single-table search
Updated filters to use single table where needed.
This commit is contained in:
@@ -129,11 +129,11 @@ class EntityHydrator
|
||||
foreach ($entities as $entity) {
|
||||
if ($entity instanceof Page || $entity instanceof Chapter) {
|
||||
$key = 'book:' . $entity->getRawAttribute('book_id');
|
||||
$entity->setAttribute('book', $parentMap[$key] ?? null);
|
||||
$entity->setRelation('book', $parentMap[$key] ?? null);
|
||||
}
|
||||
if ($entity instanceof Page) {
|
||||
$key = 'chapter:' . $entity->getRawAttribute('chapter_id');
|
||||
$entity->setAttribute('chapter', $parentMap[$key] ?? null);
|
||||
$entity->setRelation('chapter', $parentMap[$key] ?? null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user