mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-12-11 07:26:10 +00:00
445ba883a2
Following on from I551414b1, disable query highlighting for the list of languages provided by @TJones in T281797. The user's interface language can be different from the wiki's content language and so the former is not available at configuration time. Thus, we fetch the user's interface language at request time. Fortunately, @TJones' list of languages is small so there should be little perceivable performance impact from the perpective of the user. Additional changes: - Remove the config.VectorWvuiSearchOptions.value.highlightQuery property from skin.json Bug: T281797 Change-Id: Ib39736a93fa64e82253f88551d125413e672558b
38 lines
846 B
PHP
38 lines
846 B
PHP
<?php
|
|
|
|
namespace Vector;
|
|
|
|
use MediaWiki\MediaWikiServices;
|
|
use Vector\FeatureManagement\FeatureManager;
|
|
use Vector\Services\LanguageService;
|
|
|
|
/**
|
|
* A service locator for services specific to Vector.
|
|
*
|
|
* @package Vector
|
|
* @internal
|
|
*/
|
|
final class VectorServices {
|
|
|
|
/**
|
|
* Gets the feature manager service.
|
|
*
|
|
* Per its definition in ServiceWiring.php, the feature manager service is bound to the global
|
|
* request and user objects and to the _Vector.Config_ service.
|
|
*
|
|
* @return FeatureManager
|
|
*/
|
|
public static function getFeatureManager(): FeatureManager {
|
|
return MediaWikiServices::getInstance()->getService( Constants::SERVICE_FEATURE_MANAGER );
|
|
}
|
|
|
|
/**
|
|
* Gets the language service.
|
|
*
|
|
* @return LanguageService
|
|
*/
|
|
public static function getLanguageService(): LanguageService {
|
|
return new LanguageService();
|
|
}
|
|
}
|