Remove obvious function-level profiling
Change-Id: I835cc1ce411b2cf583c1dc22196378e7c4ab1244
This commit is contained in:
@@ -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 '';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user