summaryrefslogtreecommitdiff
path: root/www/wiki/mw-config/overrides/README
blob: 9a9d84db2f89a246df98d35c7094eb515745b582 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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 installer 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";
	}
}