From cdf9af5e529f94cc11f9243f77e92f871aaa4503 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Fri, 27 Mar 2020 13:30:38 +0100 Subject: [PATCH] User online lookup for the article page was using the article id instead of the content id --- .../page/handler/ArticlePageHandler.class.php | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/wcfsetup/install/files/lib/system/page/handler/ArticlePageHandler.class.php b/wcfsetup/install/files/lib/system/page/handler/ArticlePageHandler.class.php index 29c95c2458..baf36b686a 100644 --- a/wcfsetup/install/files/lib/system/page/handler/ArticlePageHandler.class.php +++ b/wcfsetup/install/files/lib/system/page/handler/ArticlePageHandler.class.php @@ -1,5 +1,6 @@ pageObjectID === null) { return ''; } - - $article = ViewableArticleRuntimeCache::getInstance()->getObject($user->pageObjectID); - if ($article === null || !$article->canRead()) { + + $content = ViewableArticleContent::getArticleContent($user->pageObjectID); + if ($content === null || !$content->getArticle()->canRead()) { return ''; } - return WCF::getLanguage()->getDynamicVariable('wcf.page.onlineLocation.'.$page->identifier, ['article' => $article]); + return WCF::getLanguage()->getDynamicVariable('wcf.page.onlineLocation.'.$page->identifier, ['article' => $content]); } /** * @inheritDoc */ - public function prepareOnlineLocation(/** @noinspection PhpUnusedParameterInspection */Page $page, UserOnline $user) { - if ($user->pageObjectID !== null) { - ViewableArticleRuntimeCache::getInstance()->cacheObjectID($user->pageObjectID); - } - } + public function prepareOnlineLocation(/** @noinspection PhpUnusedParameterInspection */Page $page, UserOnline $user) {} } -- 2.20.1