Page MenuHomePhabricator

SocialProfile needs uses of global $wgUser removed
Closed, ResolvedPublic

Description

See parent task

Event Timeline

DannyS712 triaged this task as Medium priority.Jan 13 2020, 10:12 PM
DannyS712 created this task.
Restricted Application added projects: Social-Tools, User-DannyS712. · View Herald TranscriptJan 13 2020, 10:12 PM

Change 564140 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/SocialProfile@master] Remove use of global $wgUser (part 1)

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

Change 564140 abandoned by DannyS712:
Remove use of global $wgUser (part 1)

Reason:
Per comment

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

DannyS712 changed the task status from Open to Stalled.Jan 13 2020, 10:49 PM
DannyS712 moved this task from Unsorted to Next on the User-DannyS712 board.
DannyS712 removed a project: Patch-For-Review.
ashley moved this task from Backlog to SocialProfile on the Social-Tools board.Jan 13 2020, 11:52 PM

@ashley is actor support for SocialProfile done? The task summary says no, buthttps://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/SocialProfile/+/565779/ has been merged

@ashley is actor support for SocialProfile done?

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 ...

DannyS712 changed the task status from Stalled to Open.Feb 20 2020, 5:24 PM

Change 574925 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/SocialProfile@master] Remove uses of global $wgUser

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

Change 574926 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/SocialProfile@master] Remove uses of global $wgUser (part 2)

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

Change 574929 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/SocialProfile@master] Remove use of global $wgUser (part 3)

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

Change 574925 merged by jenkins-bot:
[mediawiki/extensions/SocialProfile@master] Remove uses of global $wgUser (part 1)

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

@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?

Change 574936 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/SocialProfile@master] Remove uses of global $wgUser (part 4)

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

Change 574937 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/SocialProfile@master] Remove uses of global $wgUser (part 5)

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

Change 574926 merged by jenkins-bot:
[mediawiki/extensions/SocialProfile@master] Remove uses of global $wgUser (part 2)

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

Change 574929 merged by jenkins-bot:
[mediawiki/extensions/SocialProfile@master] Remove uses of global $wgUser (part 3)

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

@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.

Change 575291 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/SocialProfile@master] Remove uses of global $wgUser (part 6)

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

Change 574936 merged by jenkins-bot:
[mediawiki/extensions/SocialProfile@master] Remove uses of global $wgUser (part 4)

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

Change 574937 merged by jenkins-bot:
[mediawiki/extensions/SocialProfile@master] Remove uses of global $wgUser (part 5)

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

Change 575291 merged by jenkins-bot:
[mediawiki/extensions/SocialProfile@master] Remove uses of global $wgUser (part 6)

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

DannyS712 closed this task as Resolved.Mar 3 2020, 1:52 AM
DannyS712 removed a project: Patch-For-Review.