Don't use Config as an access method for global objects
authorFlorian Schmidt <florian.schmidt.stargatewissen@gmail.com>
Tue, 4 Oct 2016 15:40:35 +0000 (17:40 +0200)
committerFlorian Schmidt <florian.schmidt.stargatewissen@gmail.com>
Tue, 4 Oct 2016 15:40:35 +0000 (17:40 +0200)
commit2d52e36018ea477db76e36026029e75f4c0b5c16
tree222f63185b9e7889f0b6fd8d2cf4763a07df6fe6
parent48df0714bbfe0d5cf3ced3de9081c02d583d78c3
Don't use Config as an access method for global objects

The Config interface (and it's implementation(s)) was never thought
to be an access method for objects saved in the global state, even
if it works with the current implementation GlobalVarConfig.

Imagine, that MediaWiki core switches to another file-based configuratiion
storage or a a database based one, we wouldn't be able to provide
access to global objects anymore, without weird hacks in the new
config-backend implementation or serializing objects to store in
the database or something else. This all isn't the idea with the Config
interface, as far as I know, so don't use it at all.

This commit changes the access to wgContLang to use the global keyword,
instead of accessing it through Config.

Follow up: Ice4f40911c3761c2542430935bc1898bc4e7a4d4
Follow up: I46f376a82205a5c99b98c9e971f9e9d7868ce9fb

Change-Id: I7a08b3bb649898abd445317a523051b07420b211
includes/OutputPage.php
includes/cache/HTMLFileCache.php