Fixed oversights on landing page.
This commit is contained in:
parent
070dc5e782
commit
be54ce2c22
1 changed files with 3 additions and 3 deletions
|
@ -53,14 +53,14 @@ class HomeRoutes extends RouteHandler {
|
||||||
|
|
||||||
private array $newsCategoryInfos = [];
|
private array $newsCategoryInfos = [];
|
||||||
|
|
||||||
private function getFeaturedNewsPosts(int $amount, bool $decorate): array {
|
private function getFeaturedNewsPosts(int $amount, bool $decorate): iterable {
|
||||||
$postInfos = $this->news->getPosts(
|
$postInfos = $this->news->getPosts(
|
||||||
onlyFeatured: true,
|
onlyFeatured: true,
|
||||||
pagination: new Pagination($amount)
|
pagination: new Pagination($amount)
|
||||||
);
|
);
|
||||||
|
|
||||||
if(!$decorate)
|
if(!$decorate)
|
||||||
return $postInfos;
|
return iterator_to_array($postInfos);
|
||||||
|
|
||||||
$posts = [];
|
$posts = [];
|
||||||
|
|
||||||
|
@ -221,7 +221,7 @@ class HomeRoutes extends RouteHandler {
|
||||||
} else $linkedData = null;
|
} else $linkedData = null;
|
||||||
|
|
||||||
$stats = $this->getStats();
|
$stats = $this->getStats();
|
||||||
$onlineUserInfos = $this->getOnlineUsers();
|
$onlineUserInfos = iterator_to_array($this->getOnlineUsers());
|
||||||
$featuredNews = $this->getFeaturedNewsPosts(3, false);
|
$featuredNews = $this->getFeaturedNewsPosts(3, false);
|
||||||
$popularTopics = $this->getPopularForumTopics($config['landing.forum_categories']);
|
$popularTopics = $this->getPopularForumTopics($config['landing.forum_categories']);
|
||||||
$activeTopics = $this->getActiveForumTopics($config['landing.forum_categories']);
|
$activeTopics = $this->getActiveForumTopics($config['landing.forum_categories']);
|
||||||
|
|
Loading…
Reference in a new issue