Merge "Remove wgULSCompactLinks configuration variable"
This commit is contained in:
@@ -50,7 +50,7 @@ class UniversalLanguageSelectorHooks {
|
|||||||
* Hook: BeforePageDisplay
|
* Hook: BeforePageDisplay
|
||||||
*/
|
*/
|
||||||
public static function addModules( $out, $skin ) {
|
public static function addModules( $out, $skin ) {
|
||||||
global $wgULSCompactLinks, $wgULSPosition, $wgULSGeoService, $wgULSEventLogging,
|
global $wgULSPosition, $wgULSGeoService, $wgULSEventLogging,
|
||||||
$wgInterwikiMagic, $wgHideInterlanguageLinks;
|
$wgInterwikiMagic, $wgHideInterlanguageLinks;
|
||||||
|
|
||||||
// Load the style for users without JS, to hide the useless links
|
// Load the style for users without JS, to hide the useless links
|
||||||
@@ -70,8 +70,7 @@ class UniversalLanguageSelectorHooks {
|
|||||||
|
|
||||||
// If compact ULS beta feature is enabled and is actually functional
|
// If compact ULS beta feature is enabled and is actually functional
|
||||||
// (see onGetBetaFeaturePreferences)
|
// (see onGetBetaFeaturePreferences)
|
||||||
if ( $wgULSCompactLinks &&
|
if ( $wgInterwikiMagic === true &&
|
||||||
$wgInterwikiMagic === true &&
|
|
||||||
$wgHideInterlanguageLinks === false &&
|
$wgHideInterlanguageLinks === false &&
|
||||||
class_exists( 'BetaFeatures' ) &&
|
class_exists( 'BetaFeatures' ) &&
|
||||||
BetaFeatures::isFeatureEnabled( $out->getUser(), 'uls-compact-links' )
|
BetaFeatures::isFeatureEnabled( $out->getUser(), 'uls-compact-links' )
|
||||||
@@ -328,11 +327,10 @@ class UniversalLanguageSelectorHooks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static function onGetBetaFeaturePreferences( $user, &$prefs ) {
|
public static function onGetBetaFeaturePreferences( $user, &$prefs ) {
|
||||||
global $wgExtensionAssetsPath, $wgULSCompactLinks,
|
global $wgExtensionAssetsPath,
|
||||||
$wgHideInterlanguageLinks, $wgInterwikiMagic;
|
$wgHideInterlanguageLinks, $wgInterwikiMagic;
|
||||||
|
|
||||||
if ( $wgULSCompactLinks &&
|
if ( $wgInterwikiMagic === true &&
|
||||||
$wgInterwikiMagic === true &&
|
|
||||||
$wgHideInterlanguageLinks === false
|
$wgHideInterlanguageLinks === false
|
||||||
) {
|
) {
|
||||||
$imagesDir = "$wgExtensionAssetsPath/UniversalLanguageSelector/resources/images";
|
$imagesDir = "$wgExtensionAssetsPath/UniversalLanguageSelector/resources/images";
|
||||||
|
|||||||
@@ -89,9 +89,7 @@
|
|||||||
"#p-lang li.interlanguage-link > a"
|
"#p-lang li.interlanguage-link > a"
|
||||||
],
|
],
|
||||||
"@ULSFontRepositoryBasePath": "Base path of ULS font repository. If not set, will be set to 'UniversalLanguageSelector/data/fontrepo/fonts/', relative to $wgExtensionAssetsPath. @since 2013.10",
|
"@ULSFontRepositoryBasePath": "Base path of ULS font repository. If not set, will be set to 'UniversalLanguageSelector/data/fontrepo/fonts/', relative to $wgExtensionAssetsPath. @since 2013.10",
|
||||||
"ULSFontRepositoryBasePath": false,
|
"ULSFontRepositoryBasePath": false
|
||||||
"@ULSCompactLinks": "Whether the \"Compact language links\" Beta Feature is exposed. Requires $wgULSPosition to be \"interlanguage\". Defaults to false. @since 2014.03",
|
|
||||||
"ULSCompactLinks": false
|
|
||||||
},
|
},
|
||||||
"callback": "UniversalLanguageSelectorHooks::setVersionConstant",
|
"callback": "UniversalLanguageSelectorHooks::setVersionConstant",
|
||||||
"ResourceModules": {
|
"ResourceModules": {
|
||||||
|
|||||||
Reference in New Issue
Block a user