In Webstart.php the path of LocalSettings.php is determined as follows
// If no LocalSettings file exists, try to display an error page
60 // (use a callback because it depends on TemplateParser)
61 if ( !defined( 'MW_CONFIG_CALLBACK' ) ) {
62 if ( !defined( 'MW_CONFIG_FILE' ) ) {
63 define( 'MW_CONFIG_FILE', "$IP/LocalSettings.php" );
64 }
65 if ( !is_readable( MW_CONFIG_FILE ) ) {
66 function wfWebStartNoLocalSettings() {
67 # LocalSettings.php is the per-site customization file. If it does not exist
68 # the wiki installer needs to be launched or the generated file uploaded to
69 # the root wiki directory. Give a hint, if it is not readable by the server.
70 global $IP;
71 require_once "$IP/includes/NoLocalSettings.php";
72 die();
73 }
74 define( 'MW_CONFIG_CALLBACK', 'wfWebStartNoLocalSettings' );
75 }
76 }Could this be extended to
if ( defined( 'MW_CONFIG_CALLBACK' ) )
{
# Use a callback function to configure MediaWiki
call_user_func( MW_CONFIG_CALLBACK );
} else
{
if ( !defined( 'MW_CONFIG_FILE' ) )
{
$mediawiki_configuration_file = apache_getenv( 'MW_CONFIG_FILE' );
if ( $mediawiki_configuration_file === false )
{
define( 'MW_CONFIG_FILE', "LocalSettings.php" );
}
else
{
define( 'MW_CONFIG_FILE', $mediawiki_configuration_file );
}
}
# LocalSettings.php is the per site customization file. If it does not exist
# the wiki installer needs to be launched or the generated file uploaded to
# the root wiki directory. Give a hint, if it is not readable by the server.
if ( !is_readable( MW_CONFIG_FILE ) )
{
require_once "$IP/includes/NoLocalSettings.php";
die();
}
# Include site settings. $IP may be changed (hopefully before the AutoLoader is invoked)
require_once MW_CONFIG_FILE;
}This allows the configuration file to be located at a different place as specified by the webserver. This makes wiki farming also easier.