diff --git a/src/main/php/de/thekid/dialog/Repository.php b/src/main/php/de/thekid/dialog/Repository.php index 5c6094e..c63ffde 100755 --- a/src/main/php/de/thekid/dialog/Repository.php +++ b/src/main/php/de/thekid/dialog/Repository.php @@ -31,7 +31,7 @@ public function authenticate(string $user, Secret $secret): ?Document { /** Returns newest entries */ public function newest(int $limit): array { $cursor= $this->database->collection('entries')->aggregate([ - ['$match' => ['is.journey' => ['$ne' => true], 'published' => ['$lt' => Date::now()]]], + ['$match' => ['is.content' => ['$eq' => true], 'published' => ['$lt' => Date::now()]]], ['$unset' => '_searchable'], ['$sort' => ['date' => -1]], ['$limit' => $limit], @@ -53,7 +53,7 @@ public function journeys(): array { /** Returns paginated entries */ public function entries(Pagination $pagination, int $page): array { $cursor= $this->database->collection('entries')->aggregate([ - ['$match' => ['is.journey' => ['$ne' => true], 'published' => ['$lt' => Date::now()]]], + ['$match' => ['is.content' => ['$eq' => true], 'published' => ['$lt' => Date::now()]]], ['$unset' => '_searchable'], ['$sort' => ['date' => -1]], ['$skip' => $pagination->skip($page)], diff --git a/src/main/php/de/thekid/dialog/import/Sources.php b/src/main/php/de/thekid/dialog/import/Sources.php index 57911f7..9116aef 100755 --- a/src/main/php/de/thekid/dialog/import/Sources.php +++ b/src/main/php/de/thekid/dialog/import/Sources.php @@ -64,7 +64,7 @@ public function items(Folder $origin): iterable { 'keywords' => $d->meta['keywords'] ?? [], 'locations' => isset($d->meta['location']) ? [$d->meta['location']] : $d->meta['locations'], 'content' => $d->content, - 'is' => ['content' => true], + 'is' => ['cover' => true], ]; } };