X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=maintenance%2FrebuildFileCache.php;h=2cdf418b2544d8da40bb326ce8e1e1d061a71d2f;hb=c5aa26678928a54cde92c23f5a563677614a29cf;hp=1f89426e7aebcf600dec94d3b189ce59934d4482;hpb=77e3624caba072521fbc1826af2d47f9b29f4032;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/rebuildFileCache.php b/maintenance/rebuildFileCache.php index 1f89426e7a..2cdf418b25 100644 --- a/maintenance/rebuildFileCache.php +++ b/maintenance/rebuildFileCache.php @@ -21,6 +21,8 @@ * @ingroup Maintenance */ +use MediaWiki\MediaWikiServices; + 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' ], - [ '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' ] @@ -113,7 +116,7 @@ class RebuildFileCache extends Maintenance { $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? }