diff options
Diffstat (limited to 'includes/installer/DatabaseInstaller.php')
-rw-r--r-- | includes/installer/DatabaseInstaller.php | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/includes/installer/DatabaseInstaller.php b/includes/installer/DatabaseInstaller.php index 31b93c88..6ccf2d55 100644 --- a/includes/installer/DatabaseInstaller.php +++ b/includes/installer/DatabaseInstaller.php @@ -305,7 +305,7 @@ abstract class DatabaseInstaller { $up = DatabaseUpdater::newForDB( $this->db ); try { $up->doUpdates(); - } catch ( MWException $e ) { + } catch ( Exception $e ) { echo "\nAn error occurred:\n"; echo $e->getText(); $ret = false; @@ -369,12 +369,17 @@ abstract class DatabaseInstaller { } /** - * 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; } /** @@ -657,7 +662,7 @@ abstract class DatabaseInstaller { if ( $row == "" ) { continue; } - $row .= "||"; + $row .= "|"; $interwikis[] = array_combine( array( 'iw_prefix', 'iw_url', 'iw_local', 'iw_api', 'iw_wikiid' ), explode( '|', $row ) |