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 "Remove unused mediawiki.ui 'checked' icons"
[lhc/web/wiklou.git]
/
maintenance
/
compareParserCache.php
diff --git
a/maintenance/compareParserCache.php
b/maintenance/compareParserCache.php
index
8bd060f
..
afbb268
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,8
+43,14
@@
class CompareParserCache extends Maintenance {
$scanned = 0;
$withcache = 0;
$withdiff = 0;
$scanned = 0;
$withcache = 0;
$withdiff = 0;
+ $parserCache = MediaWikiServices::getInstance()->getParserCache();
while ( $pages-- > 0 ) {
while ( $pages-- > 0 ) {
- $row = $dbr->selectRow( 'page', '*',
+ $row = $dbr->selectRow( 'page',
+ // @todo Title::selectFields() or Title::getQueryInfo() or something
+ [
+ 'page_namespace', 'page_title', 'page_id',
+ 'page_len', 'page_is_redirect', 'page_latest',
+ ],
[
'page_namespace' => $this->getOption( 'namespace' ),
'page_is_redirect' => 0,
[
'page_namespace' => $this->getOption( 'namespace' ),
'page_is_redirect' => 0,
@@
-66,7
+74,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 );