* @file
*/
use MediaWiki\Logger\LoggerFactory;
+use MediaWiki\MediaWikiServices;
/**
* API interface for page purging
$updates = $content->getSecondaryDataUpdates(
$title, null, $forceRecursiveLinkUpdate, $p_result );
foreach ( $updates as $update ) {
+ $update->setCause( 'api-purge', $this->getUser()->getName() );
DeferredUpdates::addUpdate( $update, DeferredUpdates::PRESEND );
}
$r['linkupdate'] = true;
if ( $enableParserCache ) {
- $pcache = ParserCache::singleton();
+ $pcache = MediaWikiServices::getInstance()->getParserCache();
$pcache->save( $p_result, $page, $popts );
}
}