From 0e5e2d6209f54fbb7afe9fb37e84c8d9ec5026a3 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 7 Jun 2006 08:57:38 +0000 Subject: [PATCH] Regression fix: installer broken by changes to include system, exceptions, and access modifiers. --- config/index.php | 14 ++------------ includes/AutoLoader.php | 1 + 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/config/index.php b/config/index.php index 05b3eebfd8..b76bda15fc 100644 --- a/config/index.php +++ b/config/index.php @@ -500,7 +500,6 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) { } print "
  • Database type: {$conf->DBtype}
  • \n"; $dbclass = 'Database'.ucfirst($conf->DBtype); - require_once("$dbclass.php"); $wgDBtype = $conf->DBtype; $wgDBadminuser = "root"; $wgDBadminpassword = $conf->RootPW; @@ -550,7 +549,7 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) { $wgDBadminpassword = $db_pass; echo( "success.\n" ); $wgDatabase->ignoreErrors( true ); - $myver = mysql_get_server_info( $wgDatabase->mConn ); + $myver = $wgDatabase->getServerVersion(); } else { # There were errors, report them and back out $ok = false; @@ -620,7 +619,7 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) { } print "\n"; - @$sel = mysql_select_db( $wgDBname, $wgDatabase->mConn ); + @$sel = $wgDatabase->selectDB( $wgDBname ); if( $sel ) { print "
  • Database " . htmlspecialchars( $wgDBname ) . " exists
  • \n"; } else { @@ -1424,15 +1423,6 @@ function locate_executable($loc, $names, $versioninfo = false) { return false; } -function get_db_version() { - global $wgDatabase, $conf; - if ($conf->DBtype == 'mysql') - return mysql_get_server_info( $wgDatabase->mConn ); - else if ($conf->DBtype == 'oracle') - return oci_server_version($wgDatabase->mConn); - else return 'unknown'; -} - # Test a memcached server function testMemcachedServer( $server ) { $hostport = explode(":", $server); diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 62ef4a26eb..cd9d0cfe63 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -45,6 +45,7 @@ function __autoload($class_name) { 'WordLevelDiff' => 'DifferenceEngine.php', 'TableDiffFormatter' => 'DifferenceEngine.php', 'EditPage' => 'EditPage.php', + 'MWException' => 'Exception.php', 'Exif' => 'Exif.php', 'FormatExif' => 'Exif.php', 'WikiExporter' => 'Export.php', -- 2.20.1