Page MenuHomePhabricator

Add/Remove/Notify of Publishers should happen in bulk
Closed, ResolvedPublic

Description

https://github.com/wikimedia/mediawiki-extensions-Newsletter/blob/master/includes/NewsletterDb.php#L95 should accept UserIdList just like addSubscription above. Same for RemovePublishers.

Possibly affected code would be:

  1. https://github.com/wikimedia/mediawiki-extensions-Newsletter/blob/master/includes/NewsletterEditPage.php#L415 -- here we should directly call our addSubscription with the whole list of users instead.
  2. Below that, the notifyPublishers() should also take a userIdList and this should happen in the next line.
  3. https://github.com/wikimedia/mediawiki-extensions-Newsletter/blob/master/includes/content/NewsletterDataUpdate.php#L126 -- same here.
  4. Probably the removePublishers() too.

Difficulty: Moderately tough, but easy once you read the examples given above.

Event Timeline

Change 400464 had a related patch set uploaded (by Pppery; owner: Pppery):
[mediawiki/extensions/Newsletter@master] Publisher add/remove functions now take user ids array

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

Change 400464 merged by jenkins-bot:
[mediawiki/extensions/Newsletter@master] Publisher add/remove functions now take user ids array

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

01tonythomas assigned this task to Pppery.

Thanks :)