From: Marcel Werk Date: Fri, 27 Mar 2020 12:30:38 +0000 (+0100) Subject: User online lookup for the article page was using the article id instead of the conte... X-Git-Tag: 3.0.24~10 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cdf9af5e529f94cc11f9243f77e92f871aaa4503;p=GitHub%2FWoltLab%2FWCF.git User online lookup for the article page was using the article id instead of the content id --- 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) {} }