X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Finstaller%2FInstaller.php;h=012b4775782aa7b1524cf61a6761136b87d8f708;hp=ae80c8bb174b011c723112b68906425e628ac685;hb=574ae4929e30700e29fef0e0d4f4824599205174;hpb=b95ca29602793f39191c06cd6941e3f32ab1bbb8 diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index ae80c8bb17..012b477578 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -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; }