Fix 'ipb_sitewide' not matching parent block after update
authorDayllan Maza <dmaza@wikimedia.org>
Mon, 4 Feb 2019 22:31:55 +0000 (17:31 -0500)
committerDayllan Maza <dmaza@wikimedia.org>
Mon, 4 Feb 2019 22:31:55 +0000 (17:31 -0500)
Autoblocks ipb_sitewide was not being updated when changing the parent
block from sitewide to partial and vice-versa

Bug: T215205
Change-Id: Ied5a8361a733c47f0afea78cc955732261ede446

includes/Block.php

index ea76cd6..db5fec3 100644 (file)
@@ -727,6 +727,7 @@ class Block {
                        'ipb_create_account'   => $this->prevents( 'createaccount' ),
                        'ipb_deleted'          => (int)$this->mHideName, // typecast required for SQLite
                        'ipb_allow_usertalk'   => !$this->prevents( 'editownusertalk' ),
+                       'ipb_sitewide'         => $this->isSitewide(),
                ] + CommentStore::getStore()->insert( $dbw, 'ipb_reason', $this->mReason )
                        + ActorMigration::newMigration()->getInsertValues( $dbw, 'ipb_by', $this->getBlocker() );
        }