Index: trunk/phase3/includes/Setup.php |
— | — | @@ -209,6 +209,10 @@ |
210 | 210 | "\nParser cache: " . get_class( $parserMemc ) . "\n" ); |
211 | 211 | |
212 | 212 | wfProfileOut( $fname.'-memcached' ); |
| 213 | + |
| 214 | +## Most of the config is out, some might want to run hooks here. |
| 215 | +wfRunHooks( 'SetupAfterCache' ); |
| 216 | + |
213 | 217 | wfProfileIn( $fname.'-SetupSession' ); |
214 | 218 | |
215 | 219 | # Set default shared prefix |
Index: trunk/extensions/Configure/Configure.func.php |
— | — | @@ -50,8 +50,16 @@ |
51 | 51 | * |
52 | 52 | * @param $wiki String |
53 | 53 | */ |
54 | | -function efConfigureSetup( $wiki = 'default' ) { |
| 54 | +function efConfigureSetup( $wiki = 'default', $afterCache = false ) { |
55 | 55 | global $wgConf, $wgConfigureFilesPath; |
| 56 | + |
| 57 | + global $wgConfigureHandler; |
| 58 | + if (!$afterCache && $wgConfigureHandler == 'db') { |
| 59 | + // Defer to after caches are set up. |
| 60 | + global $wgHooks; |
| 61 | + $wgHooks['SetupAfterCache'][] = array( 'efConfigureSetupAfterCache', $wiki ); |
| 62 | + return; |
| 63 | + } |
56 | 64 | |
57 | 65 | # Create the new configuration object... |
58 | 66 | $oldConf = $wgConf; |
— | — | @@ -71,6 +79,11 @@ |
72 | 80 | $wgConf->extract(); |
73 | 81 | } |
74 | 82 | |
| 83 | +function efConfigureSetupAfterCache( $wiki ) { |
| 84 | + efConfigureSetup( $wiki, true ); |
| 85 | + return true; |
| 86 | +} |
| 87 | + |
75 | 88 | /** |
76 | 89 | * Declare the API module only if $wgConfigureAPI is true |
77 | 90 | */ |