// Stricter version of RequestContext::sanitizeLangCode()
if ( !Language::isValidBuiltInCode( $lang ) ) {
wfDebug( "Invalid user language code\n" );
- global $wgLanguageCode;
- $lang = $wgLanguageCode;
+ $lang = $this->getResourceLoader()->getConfig()->get( 'LanguageCode' );
}
$this->language = $lang;
}
*/
public function msg() {
return call_user_func_array( 'wfMessage', func_get_args() )
- ->inLanguage( $this->getLanguage() );
+ ->inLanguage( $this->getLanguage() )
+ // Use a dummy title because there is no real title
+ // for this endpoint, and the cache won't vary on it
+ // anyways.
+ ->title( Title::newFromText( 'Dwimmerlaik' ) );
}
/**