Topic on Manual talk:Configuration for developers

Modifying another extension's config

5
Samwilson (talkcontribs)

What is the correct way for an extension to modify an existing config variable (either in another extension or in core). For example, ProofreadPage adds the Index namespace to $wgTemplateStylesNamespaces, or SpecialNamespaces modifies $wgExtraNamespaces and $wgNamespaceAliases. Currently this is done by modifying the globals.

I'm slightly suspecting that this sort of thing shouldn't be done, and actually where there's a need to change config variables then an actual mechanism should be provided for doing that (e.g. a hook).

Legoktm (talkcontribs)

It should not be done. The extension should create an attribute, and then other extensions can append to that attribute. TemplateStyles already supports this.

Legoktm (talkcontribs)
Samwilson (talkcontribs)

It sounds like the answer to this is that it should not be done, and that extensions should use attributes for this purpose.

Samwilson (talkcontribs)

@Legoktm: oops, I replied to myself without reloading the page, so didn't see your reply!

Reply to "Modifying another extension's config"