Page MenuHomePhabricator

Make blockUsers.php script capable of unblocking
Closed, ResolvedPublic

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 582924 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[mediawiki/core@master] Add a blockBatch.php script capable of both blocking and unblocking

https://gerrit.wikimedia.org/r/582924

There's already a script that do this maintenance/blockUsers.php

New script is also capable of unblocking, and it doesn't look like that one is

There's no need for a whole separate script just to add option of unblocking. If the current script does not support unlock, the right thing to do is to add the few lines of code that support unblocking not create a parallel script needlessly.

maintenance/blockUsers.php is is not old or abandoned code. In fact it was created recently by @Reedy

Yeah, this feels a bit odd to me too.

I created the other script in T246368: Create maintenance script to block a list of users less than a month ago. If you're adding another script that does part of the same work, even if you're adding extra/new functionality, you're just adding Technical-Debt

It's not like it's refactoring is needed, just a flag/similar to suggest unblock, then make it call the existing blockUsers else a new unblockUsers or similar

Ehh, seems I haven't pull MediaWiki and missed this script. I'll update my patch.

Yeah, this feels a bit odd to me too.

I created the other script in T246368: Create maintenance script to block a list of users less than a month ago. If you're adding another script that does part of the same work, even if you're adding extra/new functionality, you're just adding Technical-Debt

It's not like it's refactoring is needed, just a flag/similar to suggest unblock, then make it call the existing blockUsers else a new unblockUsers or similar

I've merged my script with yours. See linked patch :).

Reedy renamed this task from Add a blockBatch.php script capable of both blocking and unblocking to Make blockUsers.php script capable of unblocking.Mar 28 2020, 2:33 PM
Reedy updated the task description. (Show Details)
daniel triaged this task as Medium priority.Apr 8 2020, 11:28 AM

Change 582924 merged by jenkins-bot:
[mediawiki/core@master] Make blockUsers.php capable of both blocking and unblocking

https://gerrit.wikimedia.org/r/582924