jenkins-bot has submitted this change and it was merged.
Change subject: Hygiene: Move magic mobile VE module registration out of
extension function
......................................................................
Hygiene: Move magic mobile VE module registration out of extension function
...and in the hook proposed for this.
See: I29313ace8c7ab017e0406745bc12c7aef0338bf8
Bug: T88227
Change-Id: I0a0a60894a924823bd3cbb72df5dceebc745bc6b
---
M MobileFrontend.php
M includes/MobileFrontend.hooks.php
2 files changed, 8 insertions(+), 6 deletions(-)
Approvals:
Legoktm: Looks good to me, approved
jenkins-bot: Verified
diff --git a/MobileFrontend.php b/MobileFrontend.php
index f30cf69..b864cc6 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -186,7 +186,7 @@
function efMobileFrontend_Setup() {
global $wgMFNearby, $wgSpecialPages, $wgSpecialPageGroups,
$wgResourceLoaderLESSVars,
$wgResourceLoaderLESSImportPaths,
- $wgMFDeviceWidthTablet, $wgMFDeviceWidthMobileSmall,
$wgResourceModules, $wgMobileVEModules;
+ $wgMFDeviceWidthTablet, $wgMFDeviceWidthMobileSmall,
$wgMobileVEModules;
if ( $wgMFNearby ) {
$wgSpecialPages['Nearby'] = 'SpecialNearby';
@@ -206,11 +206,6 @@
'wgMFThumbnailMedium' => MobilePage::MEDIUM_IMAGE_WIDTH
. 'px',
)
);
-
- // add VisualEditor related modules only, if VisualEditor seems to be
installed - T85007
- if ( class_exists( 'VisualEditorHooks' ) ) {
- $wgResourceModules = array_merge( $wgResourceModules,
$wgMobileVEModules );
- }
}
// Config instance
diff --git a/includes/MobileFrontend.hooks.php
b/includes/MobileFrontend.hooks.php
index 3edb6b7..8e27c55 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -818,6 +818,13 @@
public static function onResourceLoaderRegisterModules( ResourceLoader
&$resourceLoader ) {
self::registerMobileLoggingSchemasModule();
+ // add VisualEditor related modules only, if VisualEditor seems
to be installed - T85007
+ if ( class_exists( 'VisualEditorHooks' ) ) {
+ $mobileVisualEditorRLmodule =
+ MobileContext::singleton()->getMFConfig()->get(
'MobileVEModules' );
+ $resourceLoader->register( $mobileVisualEditorRLmodule
);
+ }
+
return true;
}
--
To view, visit https://gerrit.wikimedia.org/r/187945
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0a0a60894a924823bd3cbb72df5dceebc745bc6b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits