}
/**
- * Get a name=>value map of MW configuration globals that overrides.
- * DefaultSettings.php
+ * Get a name=>value map of MW configuration globals for the default values.
* @return array
*/
public function getGlobalDefaults() {
- return array();
+ $defaults = array();
+ foreach ( $this->getGlobalNames() as $var ) {
+ if ( isset( $GLOBALS[$var] ) ) {
+ $defaults[$var] = $GLOBALS[$var];
+ }
+ }
+ return $defaults;
}
/**
public function getGlobalDefaults() {
// The default $wgDBmwschema is null, which breaks Postgres and other DBMSes that require
// the use of a schema, so we need to set it here
- return array(
+ return array_merge( parent::getGlobalDefaults(), array(
'wgDBmwschema' => 'mediawiki',
- );
+ ) );
}
/**
return self::checkExtension( 'mysql' ) || self::checkExtension( 'mysqli' );
}
- /**
- * @return array
- */
- public function getGlobalDefaults() {
- return array();
- }
-
/**
* @return string
*/
public function getGlobalDefaults() {
// The default $wgDBmwschema is null, which breaks Postgres and other DBMSes that require
// the use of a schema, so we need to set it here
- return array(
+ return array_merge( parent::getGlobalDefaults(), array(
'wgDBmwschema' => 'mediawiki',
- );
+ ) );
}
public function setupPLpgSQL() {
}
public function getGlobalDefaults() {
+ $defaults = parent::getGlobalDefaults();
if ( isset( $_SERVER['DOCUMENT_ROOT'] ) ) {
$path = str_replace(
array( '/', '\\' ),
dirname( $_SERVER['DOCUMENT_ROOT'] ) . '/data'
);
- return array( 'wgSQLiteDataDir' => $path );
- } else {
- return array();
+ $defaults['wgSQLiteDataDir'] = $path;
}
+ return $defaults;
}
public function getConnectForm() {