Merge "Allow wikis to customize whether Vector skins share user scripts and styles"

This commit is contained in:
jenkins-bot 2023-03-09 16:00:41 +00:00 committed by Gerrit Code Review
commit 182cbf968f
3 changed files with 10 additions and 2 deletions

View file

@ -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();

View file

@ -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();

View file

@ -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."