Index: trunk/phase3/maintenance/Maintenance.php |
— | — | @@ -839,6 +839,8 @@ |
840 | 840 | $wgWikiFarm = false; |
841 | 841 | if ( isset( $this->mOptions['conf'] ) ) { |
842 | 842 | $settingsFile = $this->mOptions['conf']; |
| 843 | + } else if ( defined("MW_CONFIG_FILE") ) { |
| 844 | + $settingsFile = MW_CONFIG_FILE; |
843 | 845 | } else { |
844 | 846 | $settingsFile = "$IP/LocalSettings.php"; |
845 | 847 | } |
Index: trunk/phase3/includes/WebStart.php |
— | — | @@ -103,17 +103,20 @@ |
104 | 104 | } |
105 | 105 | call_user_func( $callback ); |
106 | 106 | } else { |
107 | | - # LocalSettings.php is the per site customization file. If it does not exit |
108 | | - # the wiki installer need to be launched or the generated file moved from |
| 107 | + if ( !defined('MW_CONFIG_FILE') ) |
| 108 | + define('MW_CONFIG_FILE', "$IP/LocalSettings.php"); |
| 109 | + |
| 110 | + # LocalSettings.php is the per site customization file. If it does not exist |
| 111 | + # the wiki installer needs to be launched or the generated file moved from |
109 | 112 | # ./config/ to ./ |
110 | | - if( !file_exists( "$IP/LocalSettings.php" ) ) { |
| 113 | + if( !file_exists( MW_CONFIG_FILE ) ) { |
111 | 114 | require_once( "$IP/includes/DefaultSettings.php" ); # used for printing the version |
112 | 115 | require_once( "$IP/includes/templates/NoLocalSettings.php" ); |
113 | 116 | die(); |
114 | 117 | } |
115 | 118 | |
116 | 119 | # Include site settings. $IP may be changed (hopefully before the AutoLoader is invoked) |
117 | | - require_once( "$IP/LocalSettings.php" ); |
| 120 | + require_once( MW_CONFIG_FILE ); |
118 | 121 | } |
119 | 122 | |
120 | 123 | if ( $wgEnableSelenium ) { |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -87,6 +87,9 @@ |
88 | 88 | * (bug 25728) Added $wgPasswordSenderName to allow customise the name associed |
89 | 89 | with $wgPasswordSender |
90 | 90 | * Sysops now have the "suppressredirect" right by default |
| 91 | +* Special wrapping setups can now define MW_CONFIG_FILE to load a config file |
| 92 | + other than LocalSettings.php. This is like MW_CONFIG_CALLBACK but works in |
| 93 | + some cases where MW_CONFIG_CALLBACK will not work. |
91 | 94 | |
92 | 95 | === New features in 1.17 === |
93 | 96 | * (bug 10183) Users can now add personal styles and scripts to all skins via |