Allow always logging tofu detection
This commit allows to log tofu detection always, even if the rest of the webfonts library is not loaded. By default this is disabled. To enable it, set the variable $wgULSTofuLoggingChance to a number between 0 and 100, indicating the chance of it getting logged. The idea of the lottery is that even a partial sample can be useful. Change-Id: Ia08fe0de348b7eebfa95498a6be58ae41608ba3b
This commit is contained in:
committed by
Santhosh Thottingal
parent
0c8984e2f5
commit
10a25c1cc9
@@ -273,8 +273,12 @@ class UniversalLanguageSelectorHooks {
|
||||
global $wgULSGeoService,
|
||||
$wgULSIMEEnabled, $wgULSWebfontsEnabled,
|
||||
$wgULSPosition, $wgULSNoWebfontsSelectors,
|
||||
$wgULSAnonCanChangeLanguage, $wgULSEventLogging, $wgULSImeSelectors,
|
||||
$wgULSNoImeSelectors, $wgULSFontRepositoryBasePath, $wgExtensionAssetsPath;
|
||||
$wgULSAnonCanChangeLanguage,
|
||||
$wgULSEventLogging,
|
||||
$wgULSTofuLoggingChance, $wgULSTofuLoggingMaxTime,
|
||||
$wgULSImeSelectors, $wgULSNoImeSelectors,
|
||||
$wgULSFontRepositoryBasePath,
|
||||
$wgExtensionAssetsPath;
|
||||
|
||||
// Place constant stuff here (not depending on request context)
|
||||
if ( is_string( $wgULSGeoService ) ) {
|
||||
@@ -286,6 +290,8 @@ class UniversalLanguageSelectorHooks {
|
||||
$vars['wgULSPosition'] = $wgULSPosition;
|
||||
$vars['wgULSAnonCanChangeLanguage'] = $wgULSAnonCanChangeLanguage;
|
||||
$vars['wgULSEventLogging'] = $wgULSEventLogging;
|
||||
$vars['wgULSTofuLoggingChance'] = $wgULSTofuLoggingChance;
|
||||
$vars['wgULSTofuLoggingMaxTime'] = $wgULSTofuLoggingMaxTime;
|
||||
$vars['wgULSImeSelectors'] = $wgULSImeSelectors;
|
||||
$vars['wgULSNoImeSelectors'] = $wgULSNoImeSelectors;
|
||||
$vars['wgULSNoWebfontsSelectors'] = $wgULSNoWebfontsSelectors;
|
||||
|
||||
Reference in New Issue
Block a user