Index: trunk/phase3/includes/installer/WebInstaller.php |
— | — | @@ -81,6 +81,10 @@ |
82 | 82 | if ( isset( $session['settings'] ) ) { |
83 | 83 | $this->settings = $session['settings'] + $this->settings; |
84 | 84 | } |
| 85 | + |
| 86 | + /* Must be called after the session setup above */ |
| 87 | + $this->setupDatabaseObjects(); |
| 88 | + |
85 | 89 | $this->exportVars(); |
86 | 90 | $this->setupLanguage(); |
87 | 91 | |
Index: trunk/phase3/includes/installer/Installer.php |
— | — | @@ -233,6 +233,18 @@ |
234 | 234 | foreach ( $this->defaultVarNames as $var ) { |
235 | 235 | $this->settings[$var] = $GLOBALS[$var]; |
236 | 236 | } |
| 237 | + |
| 238 | + $this->parserTitle = Title::newFromText( 'Installer' ); |
| 239 | + $this->parserOptions = new ParserOptions; |
| 240 | + $this->parserOptions->setEditSection( false ); |
| 241 | + } |
| 242 | + |
| 243 | + /* |
| 244 | + * Set up our database objects. They need to inject some of their |
| 245 | + * own configuration into our global context. Usually this'll just be |
| 246 | + * things like the default $wgDBname. |
| 247 | + */ |
| 248 | + function setupDatabaseObjects() { |
237 | 249 | foreach ( $this->dbTypes as $type ) { |
238 | 250 | $installer = $this->getDBInstaller( $type ); |
239 | 251 | if ( !$installer->isCompiled() ) { |
— | — | @@ -247,10 +259,6 @@ |
248 | 260 | } |
249 | 261 | } |
250 | 262 | } |
251 | | - |
252 | | - $this->parserTitle = Title::newFromText( 'Installer' ); |
253 | | - $this->parserOptions = new ParserOptions; |
254 | | - $this->parserOptions->setEditSection( false ); |
255 | 263 | } |
256 | 264 | |
257 | 265 | /** |
Index: trunk/phase3/includes/installer/MysqlInstaller.php |
— | — | @@ -35,6 +35,10 @@ |
36 | 36 | function __construct( $parent ) { |
37 | 37 | parent::__construct( $parent ); |
38 | 38 | |
| 39 | + if ( $this->parent->getVar( 'wgDBtype' ) !== $this->getName() ) { |
| 40 | + return; |
| 41 | + } |
| 42 | + |
39 | 43 | # Add our user callback to installSteps, right before the tables are created. |
40 | 44 | $where_tables = array_search( "tables", $this->parent->installSteps ); |
41 | 45 | $callback = array( |