X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FFeedUtils.php;h=0a88b2345fb92dc0539a2a9fe77c0efb7d02274a;hb=37e13f0c6eb3f8bccc49a646de477c2c7bb0d0c7;hp=6c343ab39ff7d91b9aa144d849b62c20da145c82;hpb=0eb07d1394fcf4f16983071888d1ce3b949ce813;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/FeedUtils.php b/includes/FeedUtils.php index 6c343ab39f..0a88b2345f 100644 --- a/includes/FeedUtils.php +++ b/includes/FeedUtils.php @@ -20,6 +20,7 @@ * @file * @ingroup Feed */ +use MediaWiki\MediaWikiServices; /** * Helper functions for feeds @@ -41,7 +42,7 @@ class FeedUtils { $purge = $wgRequest->getVal( 'action' ) === 'purge'; // Allow users with 'purge' right to clear feed caches if ( $purge && $wgUser->isAllowed( 'purge' ) ) { - $cache = ObjectCache::getMainWANInstance(); + $cache = MediaWikiServices::getInstance()->getMainWANObjectCache(); $cache->delete( $timekey, 1 ); $cache->delete( $key, 1 ); } @@ -89,7 +90,7 @@ class FeedUtils { $timestamp, $row->rc_deleted & Revision::DELETED_COMMENT ? wfMessage( 'rev-deleted-comment' )->escaped() - : CommentStore::newKey( 'rc_comment' )->getComment( $row )->text, + : CommentStore::getStore()->getComment( 'rc_comment', $row )->text, $actiontext ); } @@ -97,7 +98,7 @@ class FeedUtils { /** * Really format a diff for the newsfeed * - * @param Title $title Title object + * @param Title $title * @param int $oldid Old revision's id * @param int $newid New revision's id * @param int $timestamp New revision's timestamp @@ -173,7 +174,7 @@ class FeedUtils { if ( $newContent instanceof TextContent ) { // only textual content has a "source view". - $text = $newContent->getNativeData(); + $text = $newContent->getText(); if ( $wgFeedDiffCutoff <= 0 || strlen( $text ) > $wgFeedDiffCutoff ) { $html = null;