* @file
* @ingroup Feed
*/
+use MediaWiki\MediaWikiServices;
/**
* Helper functions for feeds
$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 );
}
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;