aboutsummaryrefslogtreecommitdiffstats
path: root/includes/user/Options/LocalUserOptionsStore.php
Commit message (Collapse)AuthorAgeFilesLines
* user: Allow gender to be a global preferenceTim Starling2025-03-061-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | GenderCache gets the "gender" user preference directly out of the core database. Thus it does not respect global preferences. So: * Add UserOptionsLookup::getOptionBatchForUserNames(), which gets a single user preference for a set of named users. * Add UserOptionsStore::fetchBatchForUserNames() as a backend. This is a new interface method so is a breaking change. * Have GenderCache call the new interface. The no-database case in ServiceWiring is apparently no longer reachable from the installer due to my previous patch which split MediaWikiTitleCodec. Performance generally degrades from one query to three. For change lists and user page namespace redirects, it shouldn't be a problem, but for the {{GENDER}} parser function there may be a user-visible performance degradation. Bug: T386584 Depends-On: Id02489a597f96cd1cd6db08e16b3624542fdf1f7 Change-Id: I9646b5422afce356e9a1dceeb09d8d4e286dc65e
* Add namespace to IDBAccessObject and DBAccessObjectUtilsJames D. Forrester2024-09-271-2/+3
| | | | | Bug: T353458 Change-Id: I23cf7991f8792d4d000d1780463d8ce76dc0aee0
* UserOptionsManager: Allow global prefs for users without local accountsBartosz DziewoƄski2024-09-101-0/+10
| | | | | Bug: T371340 Change-Id: I5eba0fa558ad7f111988c17cfcee260c5a272baf
* user: Introduce UserOptionsStoreTim Starling2024-06-121-0/+96
Refactoring: * Break out the database access part of UserOptionsManager to a separate class hierarchy implementing interface UserOptionsStore. It's basically a key/key/string-value store, very simple. The complex parts of user options storage remain in UserOptionsManager. * Bundle the UserOptionsManager caches into a per-user cache object. I was adding a couple more and it was getting tedious. Start integrating GlobalPreferences with UserOptionsManager: * Have an array of stores. There's always a local store, and extensions can add stores via an attribute. * Add $global parameter to UserOptionsManager::setOption(), allowing this method to update or override global options. * Rename loadOptionsFromDb to loadOptionsFromStore. * Move the local override feature from GlobalPreferences to core. Bug: T323076 Change-Id: Ib3623b723557c819bc0ffdf21a4ffcb070eb298b