dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Show a warning in edit preview when a template loop is detected"
[lhc/web/wiklou.git]
/
maintenance
/
compareParserCache.php
diff --git
a/maintenance/compareParserCache.php
b/maintenance/compareParserCache.php
index
8bd060f
..
504c7d7
100644
(file)
--- a/
maintenance/compareParserCache.php
+++ b/
maintenance/compareParserCache.php
@@
-21,6
+21,8
@@
require_once __DIR__ . '/Maintenance.php';
require_once __DIR__ . '/Maintenance.php';
+use MediaWiki\MediaWikiServices;
+
/**
* @ingroup Maintenance
*/
/**
* @ingroup Maintenance
*/
@@
-41,6
+43,7
@@
class CompareParserCache extends Maintenance {
$scanned = 0;
$withcache = 0;
$withdiff = 0;
$scanned = 0;
$withcache = 0;
$withdiff = 0;
+ $parserCache = MediaWikiServices::getInstance()->getParserCache();
while ( $pages-- > 0 ) {
$row = $dbr->selectRow( 'page', '*',
[
while ( $pages-- > 0 ) {
$row = $dbr->selectRow( 'page', '*',
[
@@
-66,7
+69,7
@@
class CompareParserCache extends Maintenance {
$parserOptions = $page->makeParserOptions( 'canonical' );
$parserOptions = $page->makeParserOptions( 'canonical' );
- $parserOutputOld =
ParserCache::singleton()
->get( $page, $parserOptions );
+ $parserOutputOld =
$parserCache
->get( $page, $parserOptions );
if ( $parserOutputOld ) {
$t1 = microtime( true );
if ( $parserOutputOld ) {
$t1 = microtime( true );