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