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 "resourceloader: Reduce severity of unknown page module warning"
[lhc/web/wiklou.git]
/
maintenance
/
cleanupBlocks.php
diff --git
a/maintenance/cleanupBlocks.php
b/maintenance/cleanupBlocks.php
index
15bb4f3
..
db51e4b
100644
(file)
--- a/
maintenance/cleanupBlocks.php
+++ b/
maintenance/cleanupBlocks.php
@@
-23,6
+23,8
@@
require_once __DIR__ . '/Maintenance.php';
require_once __DIR__ . '/Maintenance.php';
+use MediaWiki\Block\DatabaseBlock;
+
/**
* Maintenance script to clean up user blocks with user names not matching the
* 'user' table.
/**
* Maintenance script to clean up user blocks with user names not matching the
* 'user' table.
@@
-39,7
+41,7
@@
class CleanupBlocks extends Maintenance {
public function execute() {
$db = $this->getDB( DB_MASTER );
public function execute() {
$db = $this->getDB( DB_MASTER );
- $blockQuery = Block::getQueryInfo();
+ $blockQuery =
Database
Block::getQueryInfo();
$max = $db->selectField( 'ipblocks', 'MAX(ipb_user)' );
$max = $db->selectField( 'ipblocks', 'MAX(ipb_user)' );
@@
-77,14
+79,14
@@
class CleanupBlocks extends Maintenance {
$blockQuery['joins']
);
foreach ( $res2 as $row2 ) {
$blockQuery['joins']
);
foreach ( $res2 as $row2 ) {
- $block = Block::newFromRow( $row2 );
+ $block =
Database
Block::newFromRow( $row2 );
if ( !$bestBlock ) {
$bestBlock = $block;
continue;
}
// Find the most-restrictive block. Can't use
if ( !$bestBlock ) {
$bestBlock = $block;
continue;
}
// Find the most-restrictive block. Can't use
- // Block::chooseBlock because that's for IP blocks, not
+ //
Database
Block::chooseBlock because that's for IP blocks, not
// user blocks.
$keep = null;
if ( $keep === null && $block->getExpiry() !== $bestBlock->getExpiry() ) {
// user blocks.
$keep = null;
if ( $keep === null && $block->getExpiry() !== $bestBlock->getExpiry() ) {