Index: trunk/extensions/Configure/CHANGELOG |
— | — | @@ -1,6 +1,10 @@ |
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.11.15 - 29 January 2009 |
| 6 | + New setting $wgConfigureAllowDeferSetup to allow to defer part of |
| 7 | + efConfigureSetup() when using database handler. |
| 8 | + |
5 | 9 | 0.11.14 - 26 January 2009 |
6 | 10 | Added $wgMaxRedirects, $wgInvalidRedirectTargets, $wgNoFollowDomainExceptions |
7 | 11 | and $wgUseTwoButtonsSearchForm. |
Index: trunk/extensions/Configure/Configure.php |
— | — | @@ -17,7 +17,7 @@ |
18 | 18 | 'url' => 'http://www.mediawiki.org/wiki/Extension:Configure', |
19 | 19 | 'description' => 'Allow authorised users to configure the wiki via a web-based interface', |
20 | 20 | 'descriptionmsg' => 'configure-desc', |
21 | | - 'version' => '0.11.14', |
| 21 | + 'version' => '0.11.15', |
22 | 22 | ); |
23 | 23 | |
24 | 24 | # Configuration part |
— | — | @@ -39,6 +39,16 @@ |
40 | 40 | $wgConfigureDatabase = 'config'; |
41 | 41 | |
42 | 42 | /** |
| 43 | + * Whether to allow to defer a part of efConfigureSetup() until the cache |
| 44 | + * objects are set by MediaWiki instead of doing it in efConfigureSetup(). |
| 45 | + * It is only used if $wgConfigureHandler is 'db'. |
| 46 | + * If you want to use $wgConfigureExtensionsVar (see below), you may need to |
| 47 | + * set it to false, otherwise the variables won't be set in efConfigureSetup() |
| 48 | + * by later. |
| 49 | + */ |
| 50 | +$wgConfigureAllowDeferSetup = true; |
| 51 | + |
| 52 | +/** |
43 | 53 | * Path for file-system cache, only works when $wgConfigureHandler is 'db'. |
44 | 54 | */ |
45 | 55 | $wgConfigureFileSystemCache = false; |
— | — | @@ -88,6 +98,10 @@ |
89 | 99 | * include the file. |
90 | 100 | * You'll need to handle the variable and include yourself the extension's file. |
91 | 101 | * Format is $wgConfigureExtensionsVar['ExtensionName'] = 'VarName'; |
| 102 | + * |
| 103 | + * WARNING: If you use database handler, you may need to set |
| 104 | + * $wgConfigureAllowDeferSetup = false; |
| 105 | + * to use it correctly. |
92 | 106 | */ |
93 | 107 | $wgConfigureExtensionsVar = array(); |
94 | 108 | |
Index: trunk/extensions/Configure/Configure.func.php |
— | — | @@ -57,7 +57,7 @@ |
58 | 58 | * @param $wiki String |
59 | 59 | */ |
60 | 60 | function efConfigureSetup( $wiki = 'default' ) { |
61 | | - global $wgConf, $wgConfigureFilesPath, $wgConfigureExtDir; |
| 61 | + global $wgConf, $wgConfigureFilesPath, $wgConfigureExtDir, $wgConfigureHandler, $wgConfigureAllowDeferSetup; |
62 | 62 | wfProfileIn( __FUNCTION__ ); |
63 | 63 | # Create the new configuration object... |
64 | 64 | $oldConf = $wgConf; |
— | — | @@ -73,8 +73,7 @@ |
74 | 74 | |
75 | 75 | $wgConf->snapshotDefaults(); |
76 | 76 | |
77 | | - global $wgConfigureHandler; |
78 | | - if ( $wgConfigureHandler == 'db' ) { |
| 77 | + if ( $wgConfigureAllowDeferSetup && $wgConfigureHandler == 'db' ) { |
79 | 78 | // Defer to after caches and database are set up. |
80 | 79 | global $wgHooks; |
81 | 80 | $wgHooks['SetupAfterCache'][] = array( 'efConfigureInitialise' ); |