jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: Don't add Echo modules, if Echo isn't installed ......................................................................
Hygiene: Don't add Echo modules, if Echo isn't installed Same as VisualEditor and friends. Change-Id: I927831e3586915b3d58c0c003039c3386d545f78 --- M includes/MobileFrontend.hooks.php M includes/Resources.php 2 files changed, 44 insertions(+), 35 deletions(-) Approvals: Jdlrobson: Looks good to me, approved Phuedx: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/includes/MobileFrontend.hooks.php b/includes/MobileFrontend.hooks.php index 750e796..f773478 100644 --- a/includes/MobileFrontend.hooks.php +++ b/includes/MobileFrontend.hooks.php @@ -873,6 +873,11 @@ $resourceLoader->register( $config->get( 'MobileCodeMirrorModules' ) ); } + // add Echo, if it's installed + if ( class_exists( 'MWEchoNotifUser' ) ) { + $resourceLoader->register( $config->get( 'MobileEchoModules' ) ); + }; + return true; } diff --git a/includes/Resources.php b/includes/Resources.php index da9d957..722ee93 100644 --- a/includes/Resources.php +++ b/includes/Resources.php @@ -1159,41 +1159,6 @@ ), ), - 'mobile.notifications' => $wgMFResourceFileModuleBoilerplate + array( - 'dependencies' => array( - 'mobile.overlays', - 'mediawiki.ui.anchor', - 'mobile.loggingSchemas', - ), - 'scripts' => array( - 'javascripts/modules/notifications/notifications.js', - ), - 'group' => 'user', - ), - - 'mobile.notifications.overlay' => $wgMFResourceFileModuleBoilerplate + array( - 'dependencies' => array( - 'mobile.overlays', - 'ext.echo.base', - ), - 'scripts' => array( - 'javascripts/modules/notifications/NotificationsOverlay.js', - ), - 'styles' => array( - 'less/modules/NotificationsOverlay.less', - ), - 'templates' => array( - 'content.hogan' => 'templates/modules/notifications/NotificationsOverlayContent.hogan', - ), - 'messages' => array( - // defined in Echo - 'echo-none', - 'notifications', - 'echo-overlay-link', - 'echo-notification-count', - ), - ), - 'mobile.gallery' => $wgMFResourceFileModuleBoilerplate + array( 'dependencies' => array( 'mobile.toast', @@ -1383,6 +1348,45 @@ ) ); /** + * Extension:Echo related modules + */ +$wgMobileEchoModules = array( + 'mobile.notifications' => $wgMFResourceFileModuleBoilerplate + array( + 'dependencies' => array( + 'mobile.overlays', + 'mediawiki.ui.anchor', + 'mobile.loggingSchemas', + ), + 'scripts' => array( + 'javascripts/modules/notifications/notifications.js', + ), + 'group' => 'user', + ), + + 'mobile.notifications.overlay' => $wgMFResourceFileModuleBoilerplate + array( + 'dependencies' => array( + 'mobile.overlays', + 'ext.echo.base', + ), + 'scripts' => array( + 'javascripts/modules/notifications/NotificationsOverlay.js', + ), + 'styles' => array( + 'less/modules/NotificationsOverlay.less', + ), + 'templates' => array( + 'content.hogan' => 'templates/modules/notifications/NotificationsOverlayContent.hogan', + ), + 'messages' => array( + // defined in Echo + 'echo-none', + 'notifications', + 'echo-overlay-link', + 'echo-notification-count', + ), + ), +); +/** * Mobile VisualEditor related modules */ $wgMobileVEModules = array( -- To view, visit https://gerrit.wikimedia.org/r/199640 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I927831e3586915b3d58c0c003039c3386d545f78 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.wel...@t-online.de> Gerrit-Reviewer: Florianschmidtwelzow <florian.schmidt.wel...@t-online.de> Gerrit-Reviewer: Jdlrobson <jrob...@wikimedia.org> Gerrit-Reviewer: Phuedx <g...@samsmith.io> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits