diff options
author | Daniel Friesen <dantman@users.mediawiki.org> | 2010-12-05 06:43:15 +0000 |
---|---|---|
committer | Daniel Friesen <dantman@users.mediawiki.org> | 2010-12-05 06:43:15 +0000 |
commit | ad787f1574b7598868e12d1a4a9bba3ca23d4a8f (patch) | |
tree | 48b8ca272551a8074a6cb453d063abb19a66cd76 /includes/WebStart.php | |
parent | 4809fd929e0c33191c270d4c300fe04fd7d08b02 (diff) | |
download | mediawikicore-ad787f1574b7598868e12d1a4a9bba3ca23d4a8f.tar.gz mediawikicore-ad787f1574b7598868e12d1a4a9bba3ca23d4a8f.zip |
Add MW_CONFIG_FILE support to load a separate config file instead of LocalSettings.php, similar functionality to MW_CONFIG_CALLBACK but works in some cases that it doesn't.
Notes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/77779
Diffstat (limited to 'includes/WebStart.php')
-rw-r--r-- | includes/WebStart.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/includes/WebStart.php b/includes/WebStart.php index 4060c55c592e..428b4ffeb7c3 100644 --- a/includes/WebStart.php +++ b/includes/WebStart.php @@ -103,17 +103,20 @@ if ( defined( 'MW_CONFIG_CALLBACK' ) ) { } call_user_func( $callback ); } else { - # LocalSettings.php is the per site customization file. If it does not exit - # the wiki installer need to be launched or the generated file moved from + if ( !defined('MW_CONFIG_FILE') ) + define('MW_CONFIG_FILE', "$IP/LocalSettings.php"); + + # LocalSettings.php is the per site customization file. If it does not exist + # the wiki installer needs to be launched or the generated file moved from # ./config/ to ./ - if( !file_exists( "$IP/LocalSettings.php" ) ) { + if( !file_exists( MW_CONFIG_FILE ) ) { require_once( "$IP/includes/DefaultSettings.php" ); # used for printing the version require_once( "$IP/includes/templates/NoLocalSettings.php" ); die(); } # Include site settings. $IP may be changed (hopefully before the AutoLoader is invoked) - require_once( "$IP/LocalSettings.php" ); + require_once( MW_CONFIG_FILE ); } if ( $wgEnableSelenium ) { |