Ori.livneh has uploaded a new change for review.
https://gerrit.wikimedia.org/r/229060
Change subject: Don't register unloadable test modules
......................................................................
Don't register unloadable test modules
Registering modules with the test runner that require target=mobile when target
is something other than mobile creates unloadable test modules, which breaks
things.
Change-Id: I24658c4024fa495f2b2ca8dddd47cc46961a2bac
---
M includes/MobileFrontend.hooks.php
1 file changed, 6 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/60/229060/1
diff --git a/includes/MobileFrontend.hooks.php
b/includes/MobileFrontend.hooks.php
index b2cede9..e07204a 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -257,8 +257,12 @@
public static function onResourceLoaderTestModules( array &$testModules,
ResourceLoader &$resourceLoader
) {
- // FIXME: Global core variable
- global $wgResourceModules;
+ // FIXME: Global core variables
+ global $wgResourceModules, $wgRequest;
+
+ if ( $wgRequest->getVal( 'target' ) !== 'mobile' ) {
+ return true;
+ }
$testModuleBoilerplate = array(
'localBasePath' => dirname( __DIR__ ),
--
To view, visit https://gerrit.wikimedia.org/r/229060
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I24658c4024fa495f2b2ca8dddd47cc46961a2bac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits