$data['identifier'][$page->identifier] = $page->pageID;
$data['controller'][$page->controller] = $page->pageID;
- if ($page->isLandingPage) {
+ if ($page->isLandingPage || ($data['landingPage'] === null && $page->identifier === 'com.woltlab.wcf.ArticleList')) {
$data['landingPage'] = $page;
}
}
<?php
namespace wcf\system\cache\builder;
use wcf\data\application\Application;
-use wcf\data\page\Page;
use wcf\data\page\PageCache;
use wcf\page\CmsPage;
use wcf\system\application\ApplicationHandler;
if ($application->packageID == 1) {
// handle WCF
$page = PageCacheBuilder::getInstance()->getData([], 'landingPage');
- if ($page === null) {
- // no landing page defined
- $controller = ['', '', ''];
+ if ($page->controller) {
+ $controller = $page->controller;
}
else {
- if ($page->controller) {
- $controller = $page->controller;
- }
- else {
- $controller = '__WCF_CMS__' . $page->pageID;
- $controller = [$controller, $controller, CmsPage::class];
- }
-
+ $controller = '__WCF_CMS__' . $page->pageID;
+ $controller = [$controller, $controller, CmsPage::class];
}
}
else {