Index: trunk/extensions/Configure/CHANGELOG |
— | — | @@ -1,6 +1,9 @@ |
2 | 2 | This file lists changes on this extension. |
3 | 3 | Localisation updates are done on betawiki and aren't listed here. |
4 | 4 | |
| 5 | +0.15.12 - 20 February 2010 |
| 6 | + Added 'settings-file' option to $wgConfigureAdditionalExtensions. |
| 7 | + |
5 | 8 | 0.15.11 - 19 February 2010 |
6 | 9 | * Added $wgFixArabicUnicode, $wgFixMalayalamUnicode, $wgDebugPrintHttpHeaders, |
7 | 10 | $wgDebugTimestamps, $wgMemCachedTimeout, $wgBlockDisablesLogin, |
Index: trunk/extensions/Configure/scripts/findSettings.php |
— | — | @@ -98,7 +98,7 @@ |
99 | 99 | ); |
100 | 100 | foreach ( $exts as $ext ) { |
101 | 101 | if( !$ext->isInstalled() ) continue; // must exist |
102 | | - $file = file_get_contents( $ext->getFile() ); |
| 102 | + $file = file_get_contents( $ext->getSettingsFile() ); |
103 | 103 | $name = $ext->getName(); |
104 | 104 | $m = array(); |
105 | 105 | preg_match_all( '/\$((wg|eg|edg|sdg|sfg|smwg|srfg|abc|ce[^n]|ub|whoiswatching|wminc)[A-Za-z0-9_]+)\s*\=/', $file, $m ); |
Index: trunk/extensions/Configure/settings/WebExtension.php |
— | — | @@ -19,6 +19,7 @@ |
20 | 20 | protected $mInputCallback = null; |
21 | 21 | protected $mDir; |
22 | 22 | protected $mFile; |
| 23 | + protected $mSettingsFile; |
23 | 24 | protected $mDoc; |
24 | 25 | protected $mExtVar = null; |
25 | 26 | protected $mObj = null; |
— | — | @@ -37,6 +38,7 @@ |
38 | 39 | $this->mDbChange = isset( $conf['schema'] ) && $conf['schema']; |
39 | 40 | $this->mDir = isset( $conf['dir'] ) ? $conf['dir'] : $conf['name']; |
40 | 41 | $this->mFile = isset( $conf['file'] ) ? $conf['file'] : $conf['name'] . '.php'; |
| 42 | + $this->mSettingsFile = isset( $conf['settings-file'] ) ? $conf['settings-file'] : null; |
41 | 43 | $this->mArrays = isset( $conf['array'] ) ? $conf['array'] : array(); |
42 | 44 | $this->mEmptyValues = isset( $conf['empty'] ) ? $conf['empty'] : array(); |
43 | 45 | $this->mViewRestricted = isset( $conf['view-restricted'] ) ? $conf['view-restricted'] : array(); |
— | — | @@ -161,6 +163,18 @@ |
162 | 164 | } |
163 | 165 | |
164 | 166 | /** |
| 167 | + * Get the file that contains settings definitions |
| 168 | + * |
| 169 | + * @return String |
| 170 | + */ |
| 171 | + public function getSettingsFile() { |
| 172 | + global $wgConfigureExtDir; |
| 173 | + |
| 174 | + $file = $this->mSettingsFile !== null ? $this->mSettingsFile : $this->mFile; |
| 175 | + return $wgConfigureExtDir . $this->mDir . '/' . $file; |
| 176 | + } |
| 177 | + |
| 178 | + /** |
165 | 179 | * Prettify boolean settings to be correctly displayed |
166 | 180 | * |
167 | 181 | * @return String |
Index: trunk/extensions/Configure/settings/Settings-ext.txt |
— | — | @@ -1017,6 +1017,7 @@ |
1018 | 1018 | url = http://www.mediawiki.org/wiki/Extension:WikiAtHome |
1019 | 1019 | |
1020 | 1020 | Wikilog |
| 1021 | +settings-file = WikilogDefaultSettings.php |
1021 | 1022 | settings[] = wgTaggingEntity: text |
1022 | 1023 | settings[] = wgWikilogStylePath: text |
1023 | 1024 | settings[] = wgWikilogExpensiveLimit: int |
Index: trunk/extensions/Configure/Configure.php |
— | — | @@ -18,7 +18,7 @@ |
19 | 19 | 'url' => 'http://www.mediawiki.org/wiki/Extension:Configure', |
20 | 20 | 'description' => 'Allow authorised users to configure the wiki via a web-based interface', |
21 | 21 | 'descriptionmsg' => 'configure-desc', |
22 | | - 'version' => '0.15.11', |
| 22 | + 'version' => '0.15.12', |
23 | 23 | ); |
24 | 24 | |
25 | 25 | # Configuration part |
— | — | @@ -81,7 +81,9 @@ |
82 | 82 | * Each value of this array should be an array with the following keys: |
83 | 83 | * - name: name of the extension (required) |
84 | 84 | * - dir: dir name of the extension, if different than extension's name |
85 | | - * - file: main file name, if different that name.php |
| 85 | + * - file: main file name, if different than name.php |
| 86 | + * - settings-file: file containing settings definitions, if different than |
| 87 | + * the main file |
86 | 88 | * - settings: array of settings mapping setting's name to its type |
87 | 89 | * - array: array type for settings |
88 | 90 | * - empty: array of overrides for settings values when they match empty() |