Page MenuHomePhabricator

Use SaveUserOptions hook to validate template favourites
Closed, ResolvedPublic8 Estimated Story Points

Description

Use the SaveUserOptions hook to validate the favourites data before it's saved. The hook should

  • de-duplicate the array of favourites page_id values
  • validate the data and return an error if it's not valid
    • list should contain at most 50 values
    • list should only contain positive integer values

Event Timeline

Cparle renamed this task from Use SaveUserOptions hook to limit number of favourites and prevent duplicates to Use SaveUserOptions hook to validate template favourites.Oct 23 2024, 1:04 PM
Cparle removed a project: Story.
Cparle updated the task description. (Show Details)
Cparle updated the task description. (Show Details)

Change #1124131 had a related patch set uploaded (by Samtar; author: Samtar):

[mediawiki/extensions/TemplateData@master] Hooks-SaveUserOptions: Validate template favorites

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

KSiebert set the point value for this task to 8.Mar 6 2025, 10:42 AM

Change #1124131 merged by jenkins-bot:

[mediawiki/extensions/TemplateData@master] Hooks-SaveUserOptions: Validate template favorites

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

KSiebert changed the task status from Open to Stalled.Mar 27 2025, 10:38 AM