foreach ( $this->defaultVarNames as $var ) {
$this->settings[$var] = $GLOBALS[$var];
}
+
+ $this->parserTitle = Title::newFromText( 'Installer' );
+ $this->parserOptions = new ParserOptions;
+ $this->parserOptions->setEditSection( false );
+ }
+
+ /*
+ * Set up our database objects. They need to inject some of their
+ * own configuration into our global context. Usually this'll just be
+ * things like the default $wgDBname.
+ */
+ function setupDatabaseObjects() {
foreach ( $this->dbTypes as $type ) {
$installer = $this->getDBInstaller( $type );
if ( !$installer->isCompiled() ) {
}
}
}
-
- $this->parserTitle = Title::newFromText( 'Installer' );
- $this->parserOptions = new ParserOptions;
- $this->parserOptions->setEditSection( false );
}
/**
function __construct( $parent ) {
parent::__construct( $parent );
+ if ( $this->parent->getVar( 'wgDBtype' ) !== $this->getName() ) {
+ return;
+ }
+
# Add our user callback to installSteps, right before the tables are created.
$where_tables = array_search( "tables", $this->parent->installSteps );
$callback = array(
if ( isset( $session['settings'] ) ) {
$this->settings = $session['settings'] + $this->settings;
}
+
+ /* Must be called after the session setup above */
+ $this->setupDatabaseObjects();
+
$this->exportVars();
$this->setupLanguage();