This task deals with reducing the references to wgUser in core.
See the parent task for deprecating and removing it entirely
Description
Details
Event Timeline
Status update for all mentions of $wgUser in core (checked means nothing more to do for 1.35)
- AjaxResponse::checkLastModified uses $wgUser, not as a fallback -> T245800
- FileDeleteForm::__construct falls back to $wgUser -> not passing a user is hard deprecated, see T245233, T245581
- FileDeleteForm::doDelete falls back to $wgUser -> not passing a user is hard deprecated, see T245682, T245802, T245801
- GlobalFunctions - just a comment
- OutputPage - comments
- Revision (lots) - entire class is soft deprecated
- Setup - only use is setting $wgUser
- Title::userCan falls back to $wgUser -> entire function is harddeprecated, see T244923
- Title::quickUserCan falls back to $wgUser -> entire function is hard deprecated, see T244927
- Title::getNotificationTimestamp falls back to $wgUser -> not passing a user is hard deprecated, see T245702
- Title::moveSubpages - was hard deprecated, removed, see T245483
- WebRequest::getLimitOffset uses $wgUser -> hard deprecated, see T243805, T245779, T245777
- ApiMain::__construct - writes to $wgUser
- ApiQuery(Info|RecentChanges|Revisions|Users) - lots, see T245329
- GenderCache::getGenderOff
- MessageCache::getParserOptions (made private to simplify further changes, see T247189)
- RecentChange::markPatrolled falls back to $wgUser - entire function should be hard deprecated, see T245195
- RequestContext::importScopedSession - writes to $wgUser
- LocalFile::recordUpload - entire function should be hard deprecated
- LocalFile::recordUpload2 falls back to $wgUser
- LocalFileDeleteBatch::__construct falls back to $wgUser - see T245710
- Installer::__construct - writes to $wgUser
- DoubleRedirectJob - writes to $wgUser
- Linker::userToolLinks - reads from $wgUser, use removed, see T244602
- LogEventsList::typeAction - uses $wgUser
- LogEventsList::userCan(Bitfield|ViewLogType)? - falls back to $wgUser, not passing a user is hard deprecated, see T245704
- LogEventsList::getExcludeClause
- LogPage::addEntry - falls back to $wgUser, not passing a user is hard deprecated, see T243652, T245701
- PatrolLog::record - falls back to $wgUser, not passing a user is hard deprecated, see T245707
- Article - comment
- PageArchive::undelete - falls back to $wgUser
- WikiPage::doEditContent - falls back to $wgUser, entire function is soft deprecated
- WikiPage::prepareContentForEdit - falls back to $wgUser, entire function is soft deprecated
- WikiPage::insertProtectNullRevision - falls back to $wgUser (in Revision::newNullRevision), not passing a user is hard deprecated, see T245705
- WikiPage::doDeleteArticleReal - falls back to $wgUser
- Parser - comment
- ParserOptions::__construct
- SessionProvider - comment
- LoginSignupSpecialPage - writes to $wgUser
- SpecialPageFactory - writes to $wgUser
- (deprecated, old) SpecialPageFactory - should all be hard deprecated, see T245686
- UploadFromUrl::isValidRequest
- UploadStash::__construct falls back to $wgUser
- User - comments
- Language::userAdjust and ::dateFormat
- LanguageConverter::getPreferredVariant
- maintenance scripts writing to wgUser: cleanupSpam, deleteBatch, deleteDefaultMessages, deleteEqualMessages, edit, importImages, importSiteScripts, moveBatch, preprocessorFuzzTest, undelete
Tests
- ParserTestRunner::perTestSetup writes to $wgUser
- MediaWikiIntegrationTestCase
- EditPageTest
- RevisionDbTestBase (will be removed in T246411)
- RevisionTest
- ApiLogoutTest
- ApiMainTest
- ApiTestCase lots (::doLogin is hard deprecated, see T244039, T245332, T245355)
- ApiUserrightsTest
- CheckBlocksSecondaryAuthenticationProviderTest
- CssContentTest
- TextContentTest
- RequestContextTest
- ConverterRuleTest
- LogFormatterTest
- WikiPageDbTestBase
- ParserOptionsTest
- UploadStashTest
- UserTest
- LanguageConverterTest
- DumpTestCase
Change 576194 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] UploadFromUrl: Remove redundant check of user perms in isValidRequest
Change 579097 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Tests: Remove unneeded uses of global $wgUser
Change 579097 merged by jenkins-bot:
[mediawiki/core@master] Tests: Remove unneeded uses of global $wgUser
Change 579799 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Don't declare global $wgUser unless needed
Change 579799 merged by jenkins-bot:
[mediawiki/core@master] WikiPageDbTestBase: Remove use of global $wgUser
Change 580160 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] ApiLogoutTest: Remove use of global $wgUser
Change 588161 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] LanguageConverterTest: Reduce direct references to $wgUser
Change 588161 merged by jenkins-bot:
[mediawiki/core@master] LanguageConverterTest: Reduce direct references to $wgUser
Change 593279 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] ParserOptionsTest: Rename non-global variable $wgUser
Change 593279 merged by jenkins-bot:
[mediawiki/core@master] ParserOptionsTest: Rename non-global variable $wgUser
Change 602540 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] maintenance scripts: Reduce direct references to $wgUser
Change 602540 merged by jenkins-bot:
[mediawiki/core@master] maintenance scripts: Reduce direct references to $wgUser
Change 602654 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Reduce further direct references to $wgUser
Change 602654 merged by jenkins-bot:
[mediawiki/core@master] Reduce further direct references to $wgUser
Change 603068 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Reduce direct uses of $wgUser in ApiQueryInfo's token methods
Change 603068 merged by jenkins-bot:
[mediawiki/core@master] Reduce direct uses of $wgUser in ApiQueryInfo's token methods
Change 609632 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Mark token methods in query apis as internal
Change 609632 abandoned by DannyS712:
[mediawiki/core@master] Mark token methods in query apis as internal
Reason:
since the hooks were removed, users can now be injected
Change 626246 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Remove uses of $wgUser in api token methods
Change 580160 merged by jenkins-bot:
[mediawiki/core@master] ApiLogoutTest: Remove use of global $wgUser
Change 626246 merged by jenkins-bot:
[mediawiki/core@master] Remove uses of $wgUser in api token methods
Change 626897 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Reduce use of $wgUser in EditPageTest
Change 626898 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Remove use of $wgUser in ApiUserrightsTest
Change 626899 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] RequestContextTest: No need to set $wgUser
Change 626898 merged by jenkins-bot:
[mediawiki/core@master] Remove use of $wgUser in ApiUserrightsTest
Change 626899 merged by jenkins-bot:
[mediawiki/core@master] RequestContextTest: No need to set $wgUser
Change 626905 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Remove outdated documentation from addNewUserLogEntry
Change 626905 merged by jenkins-bot:
[mediawiki/core@master] Remove User::addNewUserLogEntry
Change 627219 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Remove use of $wgUser from LogFormatterTest, unneeded
Change 627219 merged by jenkins-bot:
[mediawiki/core@master] Remove use of $wgUser from LogFormatterTest, unneeded
Change 626897 merged by jenkins-bot:
[mediawiki/core@master] Reduce use of $wgUser in EditPageTest
Change 627225 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] cleanupSpam - reduce direct references to $wgUser
Change 627225 merged by jenkins-bot:
[mediawiki/core@master] cleanupSpam - reduce direct references to $wgUser
Change 627463 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] CheckBlocksSecondaryAuthenticationProviderTest: No need to set $wgUser
Change 627464 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] UserTest: No need to set $wgUser
Change 627465 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] EditPageTest: No need to set $wgUser
Change 627606 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] LanguageFi::translateBlockExpiry update $user docs
Change 627606 merged by jenkins-bot:
[mediawiki/core@master] Language::translateBlockExpiry update $user docs
Change 627463 merged by jenkins-bot:
[mediawiki/core@master] CheckBlocksSecondaryAuthenticationProviderTest: No need to set $wgUser
Change 627464 merged by jenkins-bot:
[mediawiki/core@master] UserTest: No need to set $wgUser
Change 627465 merged by jenkins-bot:
[mediawiki/core@master] EditPageTest: No need to set $wgUser
Change 630229 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Reduce some direct references to $wgUser
Change 630229 merged by jenkins-bot:
[mediawiki/core@master] Reduce some direct references to $wgUser
Change 633248 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Reduce some references to $wgUser
Change 633248 merged by jenkins-bot:
[mediawiki/core@master] Reduce some references to $wgUser
Change 649392 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] ApiBase: update outdated comment about canApiHighLimits
Change 649393 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] cleanupSpam: pass a user when editing a page
Change 649395 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] LanguageConverterTest: reduce direct references to $wgUser
Change 649396 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] DumpTestCase - stop writing to $wgUser
Change 649393 merged by jenkins-bot:
[mediawiki/core@master] cleanupSpam: pass a user when editing a page
Change 649396 merged by jenkins-bot:
[mediawiki/core@master] DumpTestCase - stop writing to $wgUser
Change 649395 merged by jenkins-bot:
[mediawiki/core@master] LanguageConverterTest: reduce direct references to $wgUser
Change 649392 merged by jenkins-bot:
[mediawiki/core@master] ApiBase: update outdated comment about canApiHighLimits
Change 693254 had a related patch set uploaded (by DannyS712; author: DannyS712):
[mediawiki/core@master] TableCleanup: stop writing to $wgUser
Change 701275 had a related patch set uploaded (by DannyS712; author: DannyS712):
[mediawiki/core@master] MessageCache: stop reading from $wgUser
Change 701276 had a related patch set uploaded (by DannyS712; author: DannyS712):
[mediawiki/core@master] LanguageConverter: stop reading from $wgUser
Change 576194 merged by jenkins-bot:
[mediawiki/core@master] UploadFromUrl: Remove use of $wgUser in isValidRequest
Change 693254 merged by jenkins-bot:
[mediawiki/core@master] TableCleanup: stop writing to $wgUser
Change 701276 merged by jenkins-bot:
[mediawiki/core@master] LanguageConverter: stop reading from $wgUser
Change 701275 merged by jenkins-bot:
[mediawiki/core@master] MessageCache: stop reading from $wgUser
Change 802832 had a related patch set uploaded (by DannyS712; author: DannyS712):
[mediawiki/core@master] Reduce direct writes to $wgUser