Check minimum database server version when running update.php
[lhc/web/wiklou.git] / includes / installer / Installer.php
index ae80c8b..012b477 100644 (file)
@@ -546,6 +546,17 @@ abstract class Installer {
                return $this->compiledDBs;
        }
 
+       /**
+        * Get the DatabaseInstaller class name for this type
+        *
+        * @param string $type database type ($wgDBtype)
+        * @return string Class name
+        * @since 1.30
+        */
+       public static function getDBInstallerClass( $type ) {
+               return ucfirst( $type ) . 'Installer';
+       }
+
        /**
         * Get an instance of DatabaseInstaller for the specified DB type.
         *
@@ -561,7 +572,7 @@ abstract class Installer {
                $type = strtolower( $type );
 
                if ( !isset( $this->dbInstallers[$type] ) ) {
-                       $class = ucfirst( $type ) . 'Installer';
+                       $class = self::getDBInstallerClass( $type );
                        $this->dbInstallers[$type] = new $class( $this );
                }
 
@@ -1389,7 +1400,7 @@ abstract class Installer {
                        }
                }
                closedir( $dh );
-               natcasesort( $exts );
+               uksort( $exts, 'strnatcasecmp' );
 
                return $exts;
        }