Florianschmidtwelzow has uploaded a new change for review.
https://gerrit.wikimedia.org/r/187945
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, 7 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/45/187945/1
diff --git a/MobileFrontend.php b/MobileFrontend.php
index f30cf69..ad761c8 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -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: newchange
Gerrit-Change-Id: I0a0a60894a924823bd3cbb72df5dceebc745bc6b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits