Aaron Schulz has uploaded a new change for review.
https://gerrit.wikimedia.org/r/261616
Change subject: Avoid calling Block::deleteIfExpired() when not needed
......................................................................
Avoid calling Block::deleteIfExpired() when not needed
Just ignore the block and let the block insert/update code
handle the logic of pruning expired conflicting blocks as
well as other expired block to other users (as is done
already).
Bug: T92357
Change-Id: Iafcae829af09ed7e8d134cd6c1b2d5bd57ea0f22
---
M includes/Block.php
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/16/261616/1
diff --git a/includes/Block.php b/includes/Block.php
index 4729f50..7b287dc 100644
--- a/includes/Block.php
+++ b/includes/Block.php
@@ -296,7 +296,7 @@
$block = self::newFromRow( $row );
# Don't use expired blocks
- if ( $block->deleteIfExpired() ) {
+ if ( $block->isExpired() ) {
continue;
}
@@ -1140,7 +1140,7 @@
$blocks = array();
foreach ( $rows as $row ) {
$block = self::newFromRow( $row );
- if ( !$block->deleteIfExpired() ) {
+ if ( !$block->isExpired() ) {
$blocks[] = $block;
}
}
--
To view, visit https://gerrit.wikimedia.org/r/261616
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iafcae829af09ed7e8d134cd6c1b2d5bd57ea0f22
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits