Use ipb_id when updating expiry in Block::updateTimestamp()
authorKunal Mehta <legoktm@member.fsf.org>
Thu, 3 Mar 2016 02:48:08 +0000 (18:48 -0800)
committerAnomie <bjorsch@wikimedia.org>
Thu, 10 Mar 2016 17:30:29 +0000 (17:30 +0000)
If Block::purgeExpired() hasn't been called due to low traffic, already
expired blocks might have their timestamps extended.

Bug: T128695
Change-Id: I21e7dca57bda77a755b54d0e09f340c3f0e75bd6

includes/Block.php

index 764592d..b8e900d 100644 (file)
@@ -844,7 +844,7 @@ class Block {
                                        'ipb_expiry' => $dbw->timestamp( $this->mExpiry ),
                                ],
                                [ /* WHERE */
-                                       'ipb_address' => (string)$this->getTarget()
+                                       'ipb_id' => $this->getId(),
                                ],
                                __METHOD__
                        );