Merge "Recalculate user default options for each test"
[lhc/web/wiklou.git] / includes / FeedUtils.php
index 6108ca1..0a88b23 100644 (file)
@@ -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
                );
        }
@@ -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;