Page MenuHomePhabricator

File::recordUpload* falls back to $wgUser
Closed, ResolvedPublic

Description

Currently

  • LocalFile::recordUpload falls back to $wgUser, and is a wrapper for ::recordUpload2
  • LocalFile::recordUpload2 falls back to $wgUser

Proposal:

  • Since ::recordUpload is unused, hard deprecate it
  • Add ::recordUpload3 requiring a user to be passed, and convert 2 into a soft deprecated wrapper for 3
  • Replace deployed uses of 2 with 3, ensuring a user is always passed
  • Hard deprecate 2

Event Timeline

Restricted Application added a project: Commons. · View Herald TranscriptMar 30 2020, 5:04 AM
DannyS712 triaged this task as Medium priority.Mar 30 2020, 5:04 AM
DannyS712 moved this task from Unsorted to In progress on the User-DannyS712 board.

Change 584287 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Files: Hard deprecate recordUpload, add recordUpload3

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

Change 584287 merged by jenkins-bot:
[mediawiki/core@master] Files: Hard deprecate recordUpload, soft deprecate 2, add recordUpload3

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

Change 605715 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Use recordUpload3, hard deprecate recordUpload2

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

Change 605715 merged by jenkins-bot:
[mediawiki/core@master] Use recordUpload3, hard deprecate recordUpload2

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

DannyS712 closed this task as Resolved.Sep 11 2020, 6:14 PM
DannyS712 closed this task as Resolved.Sep 27 2020, 1:33 AM