<?php
/**
- * API for MediaWiki 1.14+
- *
- * Created on Sep 2, 2008
- *
- * Copyright © 2008 Chad Horohoe
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* @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 );
}
}