Remove obvious function-level profiling

Change-Id: I835cc1ce411b2cf583c1dc22196378e7c4ab1244
This commit is contained in:
Chad Horohoe
2015-02-10 14:10:26 -08:00
parent c882149379
commit 961e20585c

View File

@@ -147,9 +147,7 @@ class UniversalLanguageSelectorHooks {
}
protected static function isSupportedLanguage( $language ) {
wfProfileIn( __METHOD__ );
$supported = Language::fetchLanguageNames( null, 'mwfile' ); // since 1.20
wfProfileOut( __METHOD__ );
return isset( $supported[$language] );
}
@@ -159,15 +157,12 @@ class UniversalLanguageSelectorHooks {
* @return string
*/
protected static function getDefaultLanguage( array $preferred ) {
wfProfileIn( __METHOD__ );
$supported = Language::fetchLanguageNames( null, 'mwfile' ); // since 1.20
// look for a language that is acceptable to the client
// and known to the wiki.
foreach ( $preferred as $code => $weight ) {
if ( isset( $supported[$code] ) ) {
wfProfileOut( __METHOD__ );
return $code;
}
}
@@ -178,14 +173,10 @@ class UniversalLanguageSelectorHooks {
$parts = explode( '-', $code, 2 );
$code = $parts[0];
if ( isset( $supported[$code] ) ) {
wfProfileOut( __METHOD__ );
return $code;
}
}
wfProfileOut( __METHOD__ );
return '';
}