Page MenuHomePhabricator

Create an API module to allow apps to read global preferences
Closed, ResolvedPublic3 Estimated Story Points

Description

Discussion: T196314: UniversalLanguageSelector doesn't work if language is set globally in global preferences

Deliverables:

  • API module to allow apps to see if global preferences is enabled and to read preference values if so.

Event Timeline

See also T62856. In my opinion we should support setting global preferences too via the API, to be consistent with the other APIs in MediaWiki.

See also T62856. In my opinion we should support setting global preferences too via the API, to be consistent with the other APIs in MediaWiki.

Ah, thanks for pointing out that task. I was a bit hesitant about allowing global prefs to be set using the API but I think the benefits outweigh the potential concerns. I'll repurpose that ticket for supporting setting global prefs via API.

Niharika set the point value for this task to 3.Jun 26 2018, 11:24 PM
Niharika moved this task from Needs Discussion to Up Next (June 3-21) on the Community-Tech board.

Change 442983 had a related patch set uploaded (by MaxSem; owner: MaxSem):
[mediawiki/extensions/GlobalPreferences@master] Add an API module to read global prefs/local overrides

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

Vvjjkkii renamed this task from Create an API module to allow apps to read global preferences to wzaaaaaaaa.Jul 1 2018, 1:04 AM
Vvjjkkii removed MaxSem as the assignee of this task.
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed the point value for this task.
Vvjjkkii edited subscribers, added: MaxSem; removed: gerritbot, Aklapper.
CommunityTechBot renamed this task from wzaaaaaaaa to Create an API module to allow apps to read global preferences .Jul 2 2018, 6:38 AM
CommunityTechBot assigned this task to MaxSem.
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot set the point value for this task to 3.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot edited subscribers, added: gerritbot, Aklapper; removed: MaxSem.

So did we resolve how to treat the array-type preference values (i.e. email-blacklist and echo-notification-blacklist)? It sort of seems to make sense to match what core does (i.e. return as arrays, rather than newline-delimited strings), but I know that's more complexity and probably not going to be used anyway.

The above patch looks good and is ready to merge apart from this question, I think.

Change 442983 merged by jenkins-bot:
[mediawiki/extensions/GlobalPreferences@master] Add an API module to read global prefs/local overrides

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

Niharika moved this task from Needs Review/Feedback to Q1 2018-19 on the Community-Tech-Sprint board.

So did we resolve how to treat the array-type preference values (i.e. email-blacklist and echo-notification-blacklist)? It sort of seems to make sense to match what core does (i.e. return as arrays, rather than newline-delimited strings), but I know that's more complexity and probably not going to be used anyway.

The above patch looks good and is ready to merge apart from this question, I think.

Being tackled in T198935: Clean up the mess with one-off transformations for some preferences.