X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fpage%2FArticle.php;h=16328bcead0435939877fd026475d799470ecbe5;hp=b49842874e757bfffd66f9d616dadf37c1ed221e;hb=12601ff7d2796752404bfb331fccc41083d31f9f;hpb=97a8fb78faa4ca2d9604140e5547f5deae5a2524 diff --git a/includes/page/Article.php b/includes/page/Article.php index b49842874e..16328bcead 100644 --- a/includes/page/Article.php +++ b/includes/page/Article.php @@ -214,7 +214,6 @@ class Article implements Page { * @since 1.21 */ protected function getContentObject() { - if ( $this->mPage->getId() === 0 ) { # If this is a MediaWiki:x message, then load the messages # and return the message value for x. @@ -569,8 +568,8 @@ class Article implements Page { $outputPage->setRevisionTimestamp( $this->mPage->getTimestamp() ); if ( !Hooks::run( 'ArticleContentViewCustom', - [ $this->fetchContentObject(), $this->getTitle(), $outputPage ] ) ) { - + [ $this->fetchContentObject(), $this->getTitle(), $outputPage ] ) + ) { # Allow extensions do their own custom view for certain pages $outputDone = true; } @@ -980,8 +979,8 @@ class Article implements Page { } // Check for cached results - $key = wfMemcKey( 'unpatrollable-page', $title->getArticleID() ); - $cache = ObjectCache::getMainWANInstance(); + $cache = MediaWikiServices::getInstance()->getMainWANObjectCache(); + $key = $cache->makeKey( 'unpatrollable-page', $title->getArticleID() ); if ( $cache->get( $key ) ) { return false; } @@ -1121,8 +1120,8 @@ class Article implements Page { * @since 1.27 */ public static function purgePatrolFooterCache( $articleID ) { - $cache = ObjectCache::getMainWANInstance(); - $cache->delete( wfMemcKey( 'unpatrollable-page', $articleID ) ); + $cache = MediaWikiServices::getInstance()->getMainWANObjectCache(); + $cache->delete( $cache->makeKey( 'unpatrollable-page', $articleID ) ); } /** @@ -1177,8 +1176,8 @@ class Article implements Page { # Show delete and move logs if there were any such events. # The logging query can DOS the site when bots/crawlers cause 404 floods, # so be careful showing this. 404 pages must be cheap as they are hard to cache. - $cache = ObjectCache::getMainStashInstance(); - $key = wfMemcKey( 'page-recent-delete', md5( $title->getPrefixedText() ) ); + $cache = MediaWikiServices::getInstance()->getMainObjectStash(); + $key = $cache->makeKey( 'page-recent-delete', md5( $title->getPrefixedText() ) ); $loggedIn = $this->getContext()->getUser()->isLoggedIn(); if ( $loggedIn || $cache->get( $key ) ) { $logTypes = [ 'delete', 'move' ]; @@ -1434,6 +1433,8 @@ class Article implements Page { * @param bool $appendSubtitle [optional] * @param bool $forceKnown Should the image be shown as a bluelink regardless of existence? * @return string Containing HTML with redirect link + * + * @deprecated since 1.30 */ public function viewRedirect( $target, $appendSubtitle = true, $forceKnown = false ) { $lang = $this->getTitle()->getPageLanguage();