diff options
author | Max Semenik <maxsem.wiki@gmail.com> | 2016-05-18 17:40:56 -0700 |
---|---|---|
committer | Legoktm <legoktm.wikipedia@gmail.com> | 2016-06-09 17:05:35 +0000 |
commit | d1effacdb1b8fdba8757276d85eb63593c01fd57 (patch) | |
tree | 1606e83b80c6393a5dab25b7399e8e2ec1140827 /mw-config/overrides | |
parent | 1f675de5971be2454b4ff89d1a01596fb3d38e06 (diff) | |
download | mediawikicore-d1effacdb1b8fdba8757276d85eb63593c01fd57.tar.gz mediawikicore-d1effacdb1b8fdba8757276d85eb63593c01fd57.zip |
Change the way installer overrides work
Instead of "don't edit this file, edit that file", do it settings.d
style where packagers can drop their stuff in mw-config/overrides.
I propose to backport it to 1.27 because LTS.
Bug: T135695
Change-Id: I2661ba2036b2887d31ab356751d731cc8b499f26
Diffstat (limited to 'mw-config/overrides')
-rw-r--r-- | mw-config/overrides/README | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/mw-config/overrides/README b/mw-config/overrides/README new file mode 100644 index 000000000000..f2513301f873 --- /dev/null +++ b/mw-config/overrides/README @@ -0,0 +1,22 @@ +Don't modify the installer if you want to alter its behavior, including +the contents of generated LocalSettings.php in your package. Instead, +you can override classes used by the installer. + +You can override 3 classes: +* LocalSettingsGenerator - generates LocalSettings.php +* WebInstaller - web instller UI +* CliInstaller - command line installer + +Example override: + +$overrides['LocalSettingsGenerator'] = 'MyLocalSettingsGenerator'; + +class MyLocalSettingsGenerator extends LocalSettingsGenerator { + function getText() { + // Modify an existing setting + $this->values['wgDefaultSkin'] = 'vector'; + // add a new setting + $ls = parent::getText(); + return $ls . "\n\$wgMiserMode = true;\n"; + } +} |