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
Fix UploadBase::checkXMLEncodingMissmatch() on PHP 7.1+
[lhc/web/wiklou.git]
/
includes
/
Block.php
diff --git
a/includes/Block.php
b/includes/Block.php
index
e23a8ff
..
2bae13b
100644
(file)
--- a/
includes/Block.php
+++ b/
includes/Block.php
@@
-539,10
+539,7
@@
class Block {
$dbw = wfGetDB( DB_MASTER );
}
$dbw = wfGetDB( DB_MASTER );
}
- # Periodic purge via commit hooks
- if ( mt_rand( 0, 9 ) == 0 ) {
- self::purgeExpired();
- }
+ self::purgeExpired();
$row = $this->getDatabaseArray( $dbw );
$row = $this->getDatabaseArray( $dbw );
@@
-1137,15
+1134,18
@@
class Block {
return;
}
return;
}
- DeferredUpdates::addUpdate( new A
tomicSection
Update(
+ DeferredUpdates::addUpdate( new A
utoCommit
Update(
wfGetDB( DB_MASTER ),
__METHOD__,
function ( IDatabase $dbw, $fname ) {
wfGetDB( DB_MASTER ),
__METHOD__,
function ( IDatabase $dbw, $fname ) {
- $
dbw->delete(
- 'ipb
locks
',
+ $
ids = $dbw->selectFieldValues( 'ipblocks',
+ 'ipb
_id
',
[ 'ipb_expiry < ' . $dbw->addQuotes( $dbw->timestamp() ) ],
$fname
);
[ 'ipb_expiry < ' . $dbw->addQuotes( $dbw->timestamp() ) ],
$fname
);
+ if ( $ids ) {
+ $dbw->delete( 'ipblocks', [ 'ipb_id' => $ids ], $fname );
+ }
}
) );
}
}
) );
}