mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-28 01:20:07 +00:00
Merge "Allow wikis to customize whether Vector skins share user scripts and styles"
This commit is contained in:
commit
182cbf968f
|
@ -13,8 +13,10 @@ class VectorResourceLoaderUserModule extends RL\UserModule {
|
|||
protected function getPages( RL\Context $context ) {
|
||||
$user = $context->getUserObj();
|
||||
$pages = [];
|
||||
$config = $this->getConfig();
|
||||
if ( $context->getSkin() === Constants::SKIN_NAME_MODERN &&
|
||||
$this->getConfig()->get( MainConfigNames::AllowUserCss ) &&
|
||||
$config->get( 'VectorShareUserScripts' ) &&
|
||||
$config->get( MainConfigNames::AllowUserCss ) &&
|
||||
$user->isRegistered()
|
||||
) {
|
||||
$userPage = $user->getUserPage()->getPrefixedDBkey();
|
||||
|
|
|
@ -13,8 +13,10 @@ class VectorResourceLoaderUserStylesModule extends RL\UserStylesModule {
|
|||
protected function getPages( RL\Context $context ) {
|
||||
$user = $context->getUserObj();
|
||||
$pages = [];
|
||||
$config = $this->getConfig();
|
||||
if ( $context->getSkin() === Constants::SKIN_NAME_MODERN &&
|
||||
$this->getConfig()->get( MainConfigNames::AllowUserCss ) &&
|
||||
$config->get( 'VectorShareUserScripts' ) &&
|
||||
$config->get( MainConfigNames::AllowUserCss ) &&
|
||||
$user->isRegistered()
|
||||
) {
|
||||
$userPage = $user->getUserPage()->getPrefixedDBkey();
|
||||
|
|
|
@ -490,6 +490,10 @@
|
|||
}
|
||||
},
|
||||
"config": {
|
||||
"VectorShareUserScripts": {
|
||||
"value": true,
|
||||
"description": "Temporary configuration flag that determines whether Vector skins should share user scripts and styles."
|
||||
},
|
||||
"Vector2022PreviewPages": {
|
||||
"value": [],
|
||||
"description": "Temporary configuration flag for allowing users to preview the new Vector skin."
|
||||
|
|
Loading…
Reference in a new issue