See parent task
|Open||None||T11968 Reduce use of global and public variables|
|Open||None||T159283 Deprecate non-configuration globals|
|Open||DannyS712||T159299 Deprecate $wgUser|
|Open||DannyS712||T247793 Non-WMF deployed extensions need uses of global $wgUser removed [tracking]|
|Resolved||DannyS712||T244453 Social tools extensions need uses of global $wgUser removed [tracking]|
|Resolved||DannyS712||T242679 SocialProfile needs uses of global $wgUser removed|
|Open||None||T202411 The use of $wgUser and $wgTitle in UserBoard.php is scary|
- Mentioned In
- rESPR3703d23a9c88: Remove uses of global $wgUser (part 6)
rESPRd76bf2ef5941: Remove uses of global $wgUser (part 5)
rESPR48a275409a53: Remove uses of global $wgUser (part 4)
rESPR87cd0692133e: Remove uses of global $wgUser (part 3)
rESPRb6749b4308a6: Remove uses of global $wgUser (part 2)
rESPR100640f46a93: Remove uses of global $wgUser (part 1)
- Mentioned Here
- T227345: Actor support for social tools
Largely done, yes; ditto for other social tools, naturally. I'm keeping the task open for a little while longer in case if some issues resulting from the actor patch still pop up. If there's code you wish to commit, please feel free to! The actor work is no longer blocking anything, even if I'm keeping the ticket open.
There's at least one pretty major actor-related issue, currently not even tracked on Phab, that needs fixing for many social tools: in the case of an extension like Comments which allows anonymous users to perform actions, it's possible that an anonymous user has only ever left comments but performed no other actions on the wiki. In this case the actor table doesn't contain an entry for that user, and the migration scripts get confused. This is also true for other extensions like VoteNY and maybe even extensions like BlogPage or PollNY ...
@ashley I was going to update UserProfile::getProfileComplete to accept a user as a parameter as part 4, but it doesn't seem to have any calls: https://codesearch.wmflabs.org/search/?q=getProfileComplete&i=nope&files=&repos=
Is it safe to remove?
getProfileComplete was originally used by various ArmchairGM skins; as the current documentation notes, it is indeed unused currently but, I quote, "looks useful enough to be kept around". You should be able to swap the global $wgUser to $this->user in that method to update it to have the global removed since it's not a static method.