2016-05-19 00:40:56 +00:00
|
|
|
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
|
2016-06-16 05:41:00 +00:00
|
|
|
* WebInstaller - web installer UI
|
2016-07-31 20:51:47 +00:00
|
|
|
* CliInstaller - command-line installer
|
2016-05-19 00:40:56 +00:00
|
|
|
|
|
|
|
|
Example override:
|
|
|
|
|
|
|
|
|
|
$overrides['LocalSettingsGenerator'] = 'MyLocalSettingsGenerator';
|
|
|
|
|
|
2025-01-25 14:55:50 +00:00
|
|
|
class MyLocalSettingsGenerator extends MediaWiki\Installer\LocalSettingsGenerator {
|
2016-05-19 00:40:56 +00:00
|
|
|
function getText() {
|
|
|
|
|
// Modify an existing setting
|
|
|
|
|
$this->values['wgDefaultSkin'] = 'vector';
|
|
|
|
|
// add a new setting
|
|
|
|
|
$ls = parent::getText();
|
|
|
|
|
return $ls . "\n\$wgMiserMode = true;\n";
|
|
|
|
|
}
|
|
|
|
|
}
|