Page MenuHomePhabricator

Add "-username" option to approveAllPages.php
Closed, ResolvedPublicFeature

Description

The approveAllPages.php in the Approved Revs extension marks the latest revision of all pages in the wiki as the approved one. Currently, every such approval shows up in the wiki (for example, in Special:RecentChanges) as having been done by localhost, i.e "127.0.0.1". It would be good to add to this script a "-username" option, so that whoever is running the script can specify a user account that is responsible for these approvals (preferably, their own account). Please make sure that this works even for usernames containing spaces.

Event Timeline

Aklapper changed the subtype of this task from "Task" to "Feature Request".Mar 7 2022, 9:13 PM

Assuming this is a feature request.

Change 770007 had a related patch set uploaded (by Techwizzie; author: Techwizzie):

[mediawiki/extensions/ApprovedRevs@master] Add command line argument for specifying username

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

Change 770007 abandoned by Techwizzie:

[mediawiki/extensions/ApprovedRevs@master] Add command line argument for specifying username

Reason:

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

Change 770101 had a related patch set uploaded (by TechieNK; author: TechieNK):

[mediawiki/extensions/ApprovedRevs@master] Added username support for approveAllPages.php

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

@Yaron_Koren I've uploaded a patch for this microtask. Please check out.

This looks pretty good! The PHP formatting just needs some work.

This looks pretty good! The PHP formatting just needs some work.

I've made the changes related to formatting, now. Also, it seems that the other two microtasks are already pretty much done by others. Is there some more microtasks available?

Hi, Is this fine or Should I change something?

Sorry for the misunderstanding - I was wondering what was going on with this. I think the patch still needs to be fixed, to handle a username of "0" and potentially other usernames where the empty() call would return the wrong thing.

Change 770101 merged by jenkins-bot:

[mediawiki/extensions/ApprovedRevs@master] Added username support for approveAllPages.php

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

Finally fixed the patch myself. @TechieNK - thank you for your help with this.