From b3c844133a357eb882da524e936930c70502db91 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 29 Dec 2015 20:29:10 -0800 Subject: [PATCH] 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 --- includes/Block.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/Block.php b/includes/Block.php index 4729f50ced..7b287dc030 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -296,7 +296,7 @@ class Block { $block = self::newFromRow( $row ); # Don't use expired blocks - if ( $block->deleteIfExpired() ) { + if ( $block->isExpired() ) { continue; } @@ -1140,7 +1140,7 @@ class Block { $blocks = array(); foreach ( $rows as $row ) { $block = self::newFromRow( $row ); - if ( !$block->deleteIfExpired() ) { + if ( !$block->isExpired() ) { $blocks[] = $block; } } -- 2.20.1