Language::ucfirst() already has this optimisation. The expensive
method is Language::uc(), which is only called when needed.
The ord() < 128 is one of the conditionals in Language::ucfirst().
Change-Id: Idd648b7b84eba1f92dda904438122fe38d3cf22b
Hooks::run( 'MessageCache::get', array( &$lckey ) );
- if ( ord( $lckey ) < 128 ) {
- $uckey = ucfirst( $lckey );
- } else {
- $uckey = $wgContLang->ucfirst( $lckey );
- }
+ $uckey = $wgContLang->ucfirst( $lckey );
// Loop through each language in the fallback list until we find something useful
$lang = wfGetLangObj( $langcode );