Jdlrobson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/348480 )
Change subject: Remove mobile user modules ...................................................................... Remove mobile user modules These replicate functionality in core. Use User common.js/minerva.js going forward. Note this is inconsistent with how the site module behaves - that still loads mobile.js and mobile.css rather than common.css and common.js Bug: T156426 Change-Id: Ib61879a4c9b3e6c8f2bb7df4198e0cba67547817 --- M extension.json D includes/modules/MobileUserModule.php D includes/modules/MobileUserStylesModule.php 3 files changed, 0 insertions(+), 70 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/80/348480/1 diff --git a/extension.json b/extension.json index 622fdc2..0232bbf 100644 --- a/extension.json +++ b/extension.json @@ -67,8 +67,6 @@ "InlineDiffFormatter": "includes/diff/InlineDiffFormatter.php", "InlineDifferenceEngine": "includes/diff/InlineDifferenceEngine.php", "MobileSiteModule": "includes/modules/MobileSiteModule.php", - "MobileUserModule": "includes/modules/MobileUserModule.php", - "MobileUserStylesModule": "includes/modules/MobileUserStylesModule.php", "SpecialUploads": "includes/specials/SpecialUploads.php", "SpecialMobileHistory": "includes/specials/SpecialMobileHistory.php", "SpecialMobileDiff": "includes/specials/SpecialMobileDiff.php", @@ -1160,14 +1158,6 @@ "mobile.startup" ], "class": "MobileSiteModule" - }, - "mobile.usermodule.styles": { - "class": "MobileUserStylesModule", - "position": "top" - }, - "mobile.usermodule": { - "class": "MobileUserModule", - "position": "bottom" }, "mobile.special.mobilecite.styles": { "targets": "mobile", diff --git a/includes/modules/MobileUserModule.php b/includes/modules/MobileUserModule.php deleted file mode 100644 index fc25ddb..0000000 --- a/includes/modules/MobileUserModule.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php -/** - * MobileUserModule.php - */ - -/** - * Alternative of ResourceLoaderUserModule for mobile web. - * Differs from the user module by not loading common.js, - * which predate Minerva and may be incompatible. - */ -class MobileUserModule extends ResourceLoaderUserModule { - // Should not be enabled on desktop which loads 'user' instead - protected $targets = [ 'mobile' ]; - - /** - * Gets list of pages used by this module. - * @param ResourceLoaderContext $context - * @return array - */ - protected function getPages( ResourceLoaderContext $context ) { - $pages = parent::getPages( $context ); - // Remove $userpage/common.js - foreach ( array_keys( $pages ) as $key ) { - if ( preg_match( '/common\.js/', $key ) ) { - unset( $pages[$key] ); - } - } - return $pages; - } -} diff --git a/includes/modules/MobileUserStylesModule.php b/includes/modules/MobileUserStylesModule.php deleted file mode 100644 index d471fed..0000000 --- a/includes/modules/MobileUserStylesModule.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php -/** - * MobileUserStylesModule.php - */ - -/** - * Alternative of ResourceLoaderUserStylesModule for mobile web. - * Differs from the user module by not loading common.css, - * which predate Minerva and may be incompatible. - */ -class MobileUserStylesModule extends ResourceLoaderUserStylesModule { - // Should not be enabled on desktop which loads 'user.styles' instead - protected $targets = [ 'mobile' ]; - - /** - * Gets list of pages used by this module. - * @param ResourceLoaderContext $context - * @return array - */ - protected function getPages( ResourceLoaderContext $context ) { - $pages = parent::getPages( $context ); - // Remove $userpage/common.css - foreach ( array_keys( $pages ) as $key ) { - if ( preg_match( '/common\.css/', $key ) ) { - unset( $pages[$key] ); - } - } - return $pages; - } -} -- To view, visit https://gerrit.wikimedia.org/r/348480 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib61879a4c9b3e6c8f2bb7df4198e0cba67547817 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits