Do not load common.js twice

An error in both of these modules. This module is additive (it doesn't
replace the existing user module) so only needs to add new pages, not
append to existing pages.

Bug: T300070
Change-Id: I3ba2ce82ba924972d0f9fea763328510aef41f8e
This commit is contained in:
Jon Robson 2022-01-25 12:07:22 -08:00 committed by Jdlrobson
parent 252b41de79
commit 9fba9b6b9e
2 changed files with 0 additions and 2 deletions

View File

@ -16,7 +16,6 @@ class VectorResourceLoaderUserModule extends ResourceLoaderUserModule {
$user = $context->getUserObj();
$pages = [];
if ( $config->get( 'AllowUserCss' ) && !$user->isAnon() && ( $skin === Constants::SKIN_NAME_MODERN ) ) {
$pages = parent::getPages( $context );
$userPage = $user->getUserPage()->getPrefixedDBkey();
$pages["$userPage/vector.js"] = [ 'type' => 'script' ];
}

View File

@ -16,7 +16,6 @@ class VectorResourceLoaderUserStylesModule extends ResourceLoaderUserStylesModul
$user = $context->getUserObj();
$pages = [];
if ( $config->get( 'AllowUserCss' ) && !$user->isAnon() && ( $skin === Constants::SKIN_NAME_MODERN ) ) {
$pages = parent::getPages( $context );
$userPage = $user->getUserPage()->getPrefixedDBkey();
$pages["$userPage/vector.css"] = [ 'type' => 'style' ];
}