$this->settings[$var] = $GLOBALS[$var];
}
- $compiledDBs = array();
+ $this->compiledDBs = array();
foreach ( self::getDBTypes() as $type ) {
$installer = $this->getDBInstaller( $type );
if ( !$installer->isCompiled() ) {
continue;
}
- $compiledDBs[] = $type;
-
- $defaults = $installer->getGlobalDefaults();
-
- foreach ( $installer->getGlobalNames() as $var ) {
- if ( isset( $defaults[$var] ) ) {
- $this->settings[$var] = $defaults[$var];
- } else {
- $this->settings[$var] = $GLOBALS[$var];
- }
- }
+ $this->compiledDBs[] = $type;
}
- $this->compiledDBs = $compiledDBs;
$this->parserTitle = Title::newFromText( 'Installer' );
$this->parserOptions = new ParserOptions; // language will be wrong :(
/**
* Environment check for register_globals.
+ * Prevent installation if enabled
*/
protected function envCheckRegisterGlobals() {
if ( wfIniGetBool( 'register_globals' ) ) {
- $this->showMessage( 'config-register-globals' );
+ $this->showMessage( 'config-register-globals-error' );
+ return false;
}
+
+ return true;
}
/**
/**
* Actually perform the installation.
*
- * @param array $startCB A callback array for the beginning of each step
- * @param array $endCB A callback array for the end of each step
+ * @param callable $startCB A callback array for the beginning of each step
+ * @param callable $endCB A callback array for the end of each step
*
* @return array Array of Status objects
*/
/**
* Add an installation step following the given step.
*
- * @param array $callback A valid installation callback array, in this form:
+ * @param callable $callback A valid installation callback array, in this form:
* array( 'name' => 'some-unique-name', 'callback' => array( $obj, 'function' ) );
* @param string $findStep The step to find. Omit to put the step at the beginning
*/