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
Delete very incomplete translation
[lhc/web/wiklou.git]
/
maintenance
/
rebuildFileCache.php
diff --git
a/maintenance/rebuildFileCache.php
b/maintenance/rebuildFileCache.php
index
1f89426
..
2cdf418
100644
(file)
--- a/
maintenance/rebuildFileCache.php
+++ b/
maintenance/rebuildFileCache.php
@@
-21,6
+21,8
@@
* @ingroup Maintenance
*/
* @ingroup Maintenance
*/
+use MediaWiki\MediaWikiServices;
+
require_once __DIR__ . '/Maintenance.php';
/**
require_once __DIR__ . '/Maintenance.php';
/**
@@
-102,7
+104,8
@@
class RebuildFileCache extends Maintenance {
// Get the pages
$res = $dbr->select( 'page',
[ 'page_namespace', 'page_title', 'page_id' ],
// Get the pages
$res = $dbr->select( 'page',
[ 'page_namespace', 'page_title', 'page_id' ],
- [ 'page_namespace' => MWNamespace::getContentNamespaces(),
+ [ 'page_namespace' => MediaWikiServices::getInstance()->getNamespaceInfo()->
+ getContentNamespaces(),
"page_id BETWEEN " . (int)$blockStart . " AND " . (int)$blockEnd ],
__METHOD__,
[ 'ORDER BY' => 'page_id ASC', 'USE INDEX' => 'PRIMARY' ]
"page_id BETWEEN " . (int)$blockStart . " AND " . (int)$blockEnd ],
__METHOD__,
[ 'ORDER BY' => 'page_id ASC', 'USE INDEX' => 'PRIMARY' ]
@@
-113,7
+116,7
@@
class RebuildFileCache extends Maintenance {
$rebuilt = false;
$title = Title::makeTitleSafe( $row->page_namespace, $row->page_title );
$rebuilt = false;
$title = Title::makeTitleSafe( $row->page_namespace, $row->page_title );
- if (
null == $title
) {
+ if (
$title === null
) {
$this->output( "Page {$row->page_id} has bad title\n" );
continue; // broken title?
}
$this->output( "Page {$row->page_id} has bad title\n" );
continue; // broken title?
}