(bug 5445) remove autoblocks when user is unblocked
authorMarc A. Pelletier <marc@uberbox.org>
Wed, 28 Mar 2012 02:44:32 +0000 (22:44 -0400)
committerAntoine Musso <hashar@free.fr>
Thu, 3 May 2012 10:07:30 +0000 (12:07 +0200)
commit7694faf68f975ea9c4888d575b33dabb84e90083
tree5ceab5c5e1c68b9d6fbc0be14827b9f4bad7f0d1
parent5343b3eb3e4e11634be5e161120d879cd80bf70c
(bug 5445) remove autoblocks when user is unblocked

Previously, whenever we blocked a user, its IP address would be
autoblocked whenever he tries to edit a page. Thus when later unblocking
the username, he would be automatically blocked again if we forgot to
clean up is IP.

This patch introduces a the ipb_parent_block_id column in ipblocks table
to track which block triggered the autoblock command. Thus, when deleting
the original block we can easily remove all subsequentautoblocks.

Schema updaters for MySQL, SQLite and postgres have been added to the
patch but not for the other database types such as ibm_db2, mssql and
Oracle.

Change-Id: I4aa820ae9bbd962a12d0b48b6c638a1b6ff4efc9
includes/Block.php
includes/installer/MysqlUpdater.php
includes/installer/PostgresUpdater.php
includes/installer/SqliteUpdater.php
maintenance/archives/patch-ipb-parent-block-id-index.sql [new file with mode: 0644]
maintenance/archives/patch-ipb-parent-block-id.sql [new file with mode: 0644]
maintenance/ibm_db2/tables.sql
maintenance/mssql/tables.sql
maintenance/oracle/tables.sql
maintenance/postgres/tables.sql
maintenance/tables.sql