Minor code style tweak
authorChad Horohoe <demon@users.mediawiki.org>
Sun, 15 Aug 2010 18:18:02 +0000 (18:18 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Sun, 15 Aug 2010 18:18:02 +0000 (18:18 +0000)
includes/installer/DatabaseUpdater.php

index 1724209..44d1274 100644 (file)
@@ -28,11 +28,10 @@ abstract class DatabaseUpdater {
        public static function newForDB( $db, $shared ) {
                switch( $db->getType() ) {
                        case 'mysql':
-                               return new MysqlUpdater( $db, $shared );
                        case 'sqlite':
-                               return new SqliteUpdater( $db, $shared );
                        case 'oracle':
-                               return new OracleUpdater( $db, $shared );
+                               $class = ucfirst( $db->getType() ) . 'Updater';
+                               return new $class( $db, $shared );
                        default:
                                throw new MWException( __METHOD__ . ' called for unsupported $wgDBtype' );
                }