X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fcollation%2FIcuCollation.php;h=7774a60ed95cd0249caade692579a1bffb23670d;hb=de64366f58f0af7a02a417833c8e0605e4140fab;hp=d45b2ceb83bef2f0ac5f90118a348e4ce24f0e5a;hpb=227a807ef50387393df0641bce0a6cd16e550338;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/collation/IcuCollation.php b/includes/collation/IcuCollation.php index d45b2ceb83..7774a60ed9 100644 --- a/includes/collation/IcuCollation.php +++ b/includes/collation/IcuCollation.php @@ -365,16 +365,14 @@ class IcuCollation extends Collation { foreach ( $digits as $digit ) { $letters[] = $this->digitTransformLanguage->formatNum( $digit, true ); } + } elseif ( $this->locale === 'root' ) { + $letters = require "$IP/includes/collation/data/first-letters-root.php"; } else { - if ( $this->locale === 'root' ) { - $letters = require "$IP/includes/collation/data/first-letters-root.php"; - } else { - // FIXME: Is this still used? - $letters = wfGetPrecompiledData( "first-letters-{$this->locale}.ser" ); - if ( $letters === false ) { - throw new MWException( "MediaWiki does not support ICU locale " . - "\"{$this->locale}\"" ); - } + // FIXME: Is this still used? + $letters = wfGetPrecompiledData( "first-letters-{$this->locale}.ser" ); + if ( $letters === false ) { + throw new MWException( "MediaWiki does not support ICU locale " . + "\"{$this->locale}\"" ); } } @@ -528,23 +526,6 @@ class IcuCollation extends Collation { return false; } - /** - * Return the version of ICU library used by PHP's intl extension, - * or false when the extension is not installed of the version - * can't be determined. - * - * The constant INTL_ICU_VERSION this function refers to isn't really - * documented, but see https://bugs.php.net/bug.php?id=54561. - * - * @since 1.21 - * @deprecated since 1.32, use INTL_ICU_VERSION directly - * @return string - */ - static function getICUVersion() { - wfDeprecated( __METHOD__, '1.32' ); - return INTL_ICU_VERSION; - } - /** * Return the version of Unicode appropriate for the version of ICU library * currently in use, or false when it can't be determined.