Page MenuHomePhabricator

Consider removing wfAppendToArrayIfNotDefault
Closed, ResolvedPublic

Description

The global function wfAppendToArrayIfNotDefault only has one known caller, and it is in the translate extension. I propose that the code for it be moved to SpecialTranslate where it is needed, and then the core global function deprecated and removed. It doesn't need to be loaded and available for every mediawiki load when it is only needed on a single page for a specific extension

Codesearch: https://codesearch.wmcloud.org/search/?q=wfAppendToArrayIfNotDefault&i=nope&files=&repos=

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 644169 had a related patch set uploaded (by Abijeet Patro; owner: Abijeet Patro):
[mediawiki/extensions/Translate@master] Remove usage of wfAppendToArrayIfNotDefault

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

Change 644169 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Remove usage of wfAppendToArrayIfNotDefault

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

Deployed on translatewiki.net and tested.

Deployed on translatewiki.net and tested.

Still needs to be deprecated and removed from core

Deployed on translatewiki.net and tested.

Still needs to be deprecated and removed from core

Can that be done as a separate task so that we can close this?

Deployed on translatewiki.net and tested.

Still needs to be deprecated and removed from core

Can that be done as a separate task so that we can close this?

I don't think thats needed, since the original scope was for core

DannyS712 added a subscriber: abi_.
DannyS712 changed the task status from Open to Stalled.Dec 18 2020, 7:52 PM

Was hard deprecated in rMWe69efdaacaf8: Deprecate wfAppendToArrayIfNotDefault
Stalling until 1.37

Change 685403 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/core@master] Drop global function wfAppendToArrayIfNotDefault

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

Zabe changed the task status from Stalled to Open.May 5 2021, 11:32 AM
Zabe claimed this task.
Zabe added a project: User-Zabe.
Zabe added a subscriber: Zabe.

Change 685403 merged by jenkins-bot:

[mediawiki/core@master] Drop global function wfAppendToArrayIfNotDefault, deprecated in 1.36

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